[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11701: - Use std:: prefixes consist
From: |
Rob Savoye |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11701: - Use std:: prefixes consistently |
Date: |
Wed, 16 Dec 2009 10:59:30 -0700 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 11701
author: Albert Lee <address@hidden>
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Wed 2009-12-16 10:59:30 -0700
message:
- Use std:: prefixes consistently
- Replace M_SQRT1_2 with const variable
- Replace fabsf usage in OpenGL renderer (std::fabs has an overload for
floats)
- Correct as_value::readAMF0 to match prototype
- Cast ambiguously typed argument to std::ceil to double
modified:
libbase/GnashImageJpeg.h
libbase/URL.cpp
libcore/SWFMatrix.cpp
libcore/as_value.cpp
libmedia/AudioDecoderNellymoser.cpp
libmedia/AudioResampler.cpp
=== modified file 'libbase/GnashImageJpeg.h'
--- a/libbase/GnashImageJpeg.h 2009-02-25 22:33:03 +0000
+++ b/libbase/GnashImageJpeg.h 2009-12-16 17:59:30 +0000
@@ -58,7 +58,7 @@
const char* _errorOccurred;
- jmp_buf _jmpBuf;
+ std::jmp_buf _jmpBuf;
// State needed for input.
jpeg::jpeg_decompress_struct m_cinfo;
=== modified file 'libbase/URL.cpp'
--- a/libbase/URL.cpp 2009-08-11 11:13:30 +0000
+++ b/libbase/URL.cpp 2009-12-16 17:59:30 +0000
@@ -182,7 +182,7 @@
if (!dir) {
std::stringstream err;
- err << "getcwd failed: " << strerror(errno);
+ err << "getcwd failed: " << std::strerror(errno);
throw gnash::GnashException(err.str());
}
=== modified file 'libcore/SWFMatrix.cpp'
--- a/libcore/SWFMatrix.cpp 2009-10-06 07:45:26 +0000
+++ b/libcore/SWFMatrix.cpp 2009-12-16 17:59:30 +0000
@@ -192,8 +192,8 @@
// Set the scale & rotation part of the SWFMatrix.
// angle in radians.
{
- double cos_angle = cos(angle);
- double sin_angle = sin(angle);
+ double cos_angle = std::cos(angle);
+ double sin_angle = std::sin(angle);
sx = DoubleToFixed16(x_scale * cos_angle);
shy = DoubleToFixed16(y_scale * -sin_angle);
shx = DoubleToFixed16(x_scale * sin_angle);
@@ -233,10 +233,10 @@
double scale_x = get_x_scale();
double scale_y = get_y_scale();
- sx = DoubleToFixed16(scale_x * cos(rotation));
- shx = DoubleToFixed16(scale_x * sin(rotation));
- shy = -DoubleToFixed16(scale_y * sin(rot_y - rot_x + rotation));
- sy = DoubleToFixed16(scale_y * cos(rot_y - rot_x + rotation));
+ sx = DoubleToFixed16(scale_x * std::cos(rotation));
+ shx = DoubleToFixed16(scale_x * std::sin(rotation));
+ shy = -DoubleToFixed16(scale_y * std::sin(rot_y - rot_x + rotation));
+ sy = DoubleToFixed16(scale_y * std::cos(rot_y - rot_x + rotation));
}
void
=== modified file 'libcore/as_value.cpp'
--- a/libcore/as_value.cpp 2009-12-15 13:30:37 +0000
+++ b/libcore/as_value.cpp 2009-12-16 17:59:30 +0000
@@ -1471,7 +1471,7 @@
}
bool
-as_value::readAMF0(const boost::uint8_t *&b, const boost::uint8_t *end,
+as_value::readAMF0(const boost::uint8_t *&b, const boost::uint8_t *const end,
int inType, std::vector<as_object*>& objRefs, VM& vm)
{
return amf0_read_value(b, end, *this, inType, objRefs, vm);
=== modified file 'libmedia/AudioDecoderNellymoser.cpp'
--- a/libmedia/AudioDecoderNellymoser.cpp 2009-01-22 20:10:39 +0000
+++ b/libmedia/AudioDecoderNellymoser.cpp 2009-12-16 17:59:30 +0000
@@ -57,6 +57,8 @@
namespace gnash {
namespace media {
+const double sqrt1_2 = 0.70710678118654752440;
+
float nelly_neg_unpack_table[64] = {
-0.0061359000, -0.0306748003, -0.0551952012, -0.0796824023, -0.1041216031,
-0.1284981072, -0.1527972072, -0.1770042032, -0.2011045963, -0.2250839025,
@@ -674,7 +676,7 @@
for (i = 0; i < 23; i++) {
if (i > 0)
val += nelly_delta_table[get_bits(block, &bit_offset,
5)];
- pval = pow(2, val/2048);
+ pval = std::pow(2, val/2048);
for (j = 0; j < nelly_copy_count[i]; j++) {
*bptr = val;
*pptr = pval;
@@ -695,7 +697,7 @@
for (j = 0; j < NELLY_FILL_LEN; j++) {
if (bits[j] <= 0) {
- buf[j] = M_SQRT1_2*pows[j];
+ buf[j] = sqrt1_2*pows[j];
if (gimme_random() % 2)
=== modified file 'libmedia/AudioResampler.cpp'
--- a/libmedia/AudioResampler.cpp 2009-02-25 22:33:03 +0000
+++ b/libmedia/AudioResampler.cpp 2009-12-16 17:59:30 +0000
@@ -81,7 +81,7 @@
if (inc == 1 && dup == 1)
{
// No tranformation required
- memcpy(out_data, data, output_sample_count *
sizeof(boost::int16_t));
+ std::memcpy(out_data, data, output_sample_count *
sizeof(boost::int16_t));
}
else if (inc > 1)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11701: - Use std:: prefixes consistently,
Rob Savoye <=