[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-628-g05bdc96 |
Date: |
Tue, 09 Aug 2011 06:58:47 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via 05bdc969ed629967c6b34f3f95e50a2c5991cbef (commit)
via a38ca8f8df55bf339c8ecce2c5a3d80f0c47362e (commit)
via eae7855ac38f78618f1a0871df2aa12c81edfa3f (commit)
via 02d8a6c1b9192be48e5ebb1870c8679f75fe45b8 (commit)
via 25e60d2c7882f7237e286d51133a480527803b4e (commit)
via 3573d0ab52d3e3273a3a735ddd64cd9e9f36e1f8 (commit)
via db46a406460391fdf26195c0fa30fbe462eae76a (commit)
via 24680bfe7be8759f0ad08186bc052d10fca270c7 (commit)
via f57b159cbcd4dfc22a34a0714c53ff66ad753b4f (commit)
via a5b32638c76501a57c62e0414efb18bed39bb3ca (commit)
via bceff43749abd7e0d85321621bfedc7ca6b03ff2 (commit)
via dd3969779aa8470fca24de081eb4de909fa586af (commit)
from 3a590ee72055366634cce51bdcd8762aebf6aa10 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=05bdc969ed629967c6b34f3f95e50a2c5991cbef
commit 05bdc969ed629967c6b34f3f95e50a2c5991cbef
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:49:38 2011 +0200
Fix return type of operator=.
diff --git a/libbase/ImageIterators.h b/libbase/ImageIterators.h
index 246f03e..114d4e7 100644
--- a/libbase/ImageIterators.h
+++ b/libbase/ImageIterators.h
@@ -48,7 +48,7 @@ public:
/// Standard assignment just copies bytes.
//
/// Underlying bytes are really in RGBA order, so we use that.
- const ARGB& operator=(const ARGB& other) const {
+ ARGB& operator=(const ARGB& other) {
switch (_t) {
case TYPE_RGBA:
// RGBA to RGBA
http://git.savannah.gnu.org/cgit//commit/?id=a38ca8f8df55bf339c8ecce2c5a3d80f0c47362e
commit a38ca8f8df55bf339c8ecce2c5a3d80f0c47362e
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:49:29 2011 +0200
Const correct.
diff --git a/libbase/snappingrange.h b/libbase/snappingrange.h
index 9004c4a..375d304 100644
--- a/libbase/snappingrange.h
+++ b/libbase/snappingrange.h
@@ -579,7 +579,7 @@ private:
/// Calls combineRanges() once in a while, but not always. Avoids too many
/// combineRanges() checks, which could slow down everything.
- void combineRangesLazy() {
+ void combineRangesLazy() const {
const size_type max = 5;
++_combineCounter;
if (_combineCounter > max) combineRanges();
http://git.savannah.gnu.org/cgit//commit/?id=eae7855ac38f78618f1a0871df2aa12c81edfa3f
commit eae7855ac38f78618f1a0871df2aa12c81edfa3f
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:49:11 2011 +0200
Fix cppcheck warnings (preincrement).
diff --git a/libbase/extension.cpp b/libbase/extension.cpp
index 147e829..9f0a2a2 100644
--- a/libbase/extension.cpp
+++ b/libbase/extension.cpp
@@ -124,7 +124,7 @@ Extension::scanAndLoad(as_object& where)
}
std::vector<std::string>::iterator it;
- for (it = _modules.begin(); it != _modules.end(); it++) {
+ for (it = _modules.begin(); it != _modules.end(); ++it) {
const std::string& mod = *it;
log_security(_("Loading module: %s from %s"), mod, _pluginsdir);
initModule(mod, where);
@@ -259,7 +259,7 @@ Extension::dumpModules()
std::cerr << _modules.size() << " plugin(s) for Gnash installed" <<
std::endl;
std::vector<std::string>::iterator it;
- for (it = _modules.begin(); it != _modules.end(); it++) {
+ for (it = _modules.begin(); it != _modules.end(); ++it) {
std::cerr << "Module name is: \"" << *(it) << "\"" << std::endl;
}
}
http://git.savannah.gnu.org/cgit//commit/?id=02d8a6c1b9192be48e5ebb1870c8679f75fe45b8
commit 02d8a6c1b9192be48e5ebb1870c8679f75fe45b8
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:48:56 2011 +0200
Const correct.
diff --git a/libbase/Range2d.h b/libbase/Range2d.h
index f298962..ff0f160 100644
--- a/libbase/Range2d.h
+++ b/libbase/Range2d.h
@@ -20,8 +20,6 @@
// Original author: Sandro Santilli <address@hidden>
//
-
-
#ifndef GNASH_RANGE2D_H
#define GNASH_RANGE2D_H
@@ -70,30 +68,6 @@ enum RangeKind {
template <typename T>
class Range2d
{
-private:
-
- T _xmin, _xmax, _ymin, _ymax;
-
- T scaleMin(T min, float scale)
- {
- return roundMin(static_cast<float>(min) * scale);
- }
-
- T scaleMax(T max, float scale)
- {
- return roundMax(static_cast<float>(max) * scale);
- }
-
- T roundMin(float v)
- {
- return static_cast<T>(v);
- }
-
- T roundMax(float v)
- {
- return static_cast<T>(v);
- }
-
public:
/// Ouput operator
@@ -647,24 +621,22 @@ public:
return _ymax;
}
-
/// Get area (width*height)
- ///
- T getArea() const
- {
- assert ( !isWorld() );
- if ( isNull() ) return 0;
- return (_xmax - _xmin) * (_ymax - _ymin);
- // this implementation is for float types, see specialization below
- // for ints...
- }
+ ///
+ T getArea() const {
+ assert ( !isWorld() );
+ if ( isNull() ) return 0;
+ return (_xmax - _xmin) * (_ymax - _ymin);
+ // this implementation is for float types, see specialization below
+ // for ints...
+ }
/// Expand this range to include the given Range2d
//
/// WORLD ranges force result to be the WORLD range.
/// A NULL range will have no effect on the result.
///
- void expandTo(const Range2d<T>& r)
+ void expandTo(const Range2d<T>& r)
{
if ( r.isNull() )
{
@@ -693,6 +665,26 @@ public:
}
+private:
+
+ T _xmin, _xmax, _ymin, _ymax;
+
+ T scaleMin(T min, float scale) const {
+ return roundMin(static_cast<float>(min) * scale);
+ }
+
+ T scaleMax(T max, float scale) const {
+ return roundMax(static_cast<float>(max) * scale);
+ }
+
+ T roundMin(float v) const {
+ return static_cast<T>(v);
+ }
+
+ T roundMax(float v) const {
+ return static_cast<T>(v);
+ }
+
};
@@ -784,8 +776,8 @@ Intersection(const Range2d<T>& r1, const Range2d<T>& r2)
//
/// Use floor.
///
-template <> inline int
-Range2d<int>::roundMin(float min)
+template<> inline int
+Range2d<int>::roundMin(float min) const
{
return static_cast<int>(std::floor(min));
}
@@ -794,8 +786,8 @@ Range2d<int>::roundMin(float min)
//
/// Use floor.
///
-template <> inline unsigned int
-Range2d<unsigned int>::roundMin(float min)
+template<> inline unsigned int
+Range2d<unsigned int>::roundMin(float min) const
{
return static_cast<unsigned int>(std::floor(min));
}
@@ -804,8 +796,8 @@ Range2d<unsigned int>::roundMin(float min)
//
/// Use ceil.
///
-template <> inline int
-Range2d<int>::roundMax(float max)
+template<> inline int
+Range2d<int>::roundMax(float max) const
{
return static_cast<int>(std::ceil(max));
}
@@ -814,8 +806,8 @@ Range2d<int>::roundMax(float max)
//
/// Use ceil.
///
-template <> inline unsigned int
-Range2d<unsigned int>::roundMax(float max)
+template<> inline unsigned int
+Range2d<unsigned int>::roundMax(float max) const
{
return static_cast<unsigned int>(std::ceil(static_cast<float>(max)));
}
@@ -824,23 +816,23 @@ Range2d<unsigned int>::roundMax(float max)
//
/// Add one.
///
-template <> inline int
+template<> inline int
Range2d<int>::getArea() const
{
- assert ( !isWorld() );
- if ( isNull() ) return 0;
- return (_xmax - _xmin + 1) * (_ymax - _ymin + 1);
+ assert ( !isWorld() );
+ if ( isNull() ) return 0;
+ return (_xmax - _xmin + 1) * (_ymax - _ymin + 1);
}
/// Specialization of area value for unsigned int type.
//
/// Add one.
///
-template <> inline unsigned int
+template<> inline unsigned int
Range2d<unsigned int>::getArea() const
{
- assert ( isFinite() );
- return (_xmax - _xmin + 1) * (_ymax - _ymin + 1);
+ assert ( isFinite() );
+ return (_xmax - _xmin + 1) * (_ymax - _ymin + 1);
}
http://git.savannah.gnu.org/cgit//commit/?id=25e60d2c7882f7237e286d51133a480527803b4e
commit 25e60d2c7882f7237e286d51133a480527803b4e
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:48:44 2011 +0200
Use empty().
diff --git a/gui/sdl/sdl_agg_glue.cpp b/gui/sdl/sdl_agg_glue.cpp
index 520d2b3..3ae8073 100644
--- a/gui/sdl/sdl_agg_glue.cpp
+++ b/gui/sdl/sdl_agg_glue.cpp
@@ -173,7 +173,7 @@ SdlAggGlue::setInvalidatedRegions(const InvalidatedRanges&
ranges)
void
SdlAggGlue::render()
{
- if ( _drawbounds.size() == 0 ) return; // nothing to do..
+ if (_drawbounds.empty()) return; // nothing to do..
for (unsigned int bno=0; bno < _drawbounds.size(); bno++) {
geometry::Range2d<int>& bounds = _drawbounds[bno];
http://git.savannah.gnu.org/cgit//commit/?id=3573d0ab52d3e3273a3a735ddd64cd9e9f36e1f8
commit 3573d0ab52d3e3273a3a735ddd64cd9e9f36e1f8
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:48:23 2011 +0200
Fix cppcheck warnings.
Just unused variables.
diff --git a/testsuite/misc-ming.all/RemoveObject2Test.c
b/testsuite/misc-ming.all/RemoveObject2Test.c
index d3894e6..564017d 100644
--- a/testsuite/misc-ming.all/RemoveObject2Test.c
+++ b/testsuite/misc-ming.all/RemoveObject2Test.c
@@ -44,16 +44,13 @@ make_square(int x, int y, int width, int height, byte r,
byte g, byte b)
return sh;
}
-int
-main(int argc, char ** argv)
+int main(void)
{
SWFMovie mo;
SWFDisplayItem it1, it2, it3;
SWFShape sh1, sh2, sh3;
int framenum;
- argc=argc; argv=argv; /* unused... */
-
/*********************************************
*
* Initialization
diff --git a/testsuite/misc-ming.all/loop/simple_loop_test.c
b/testsuite/misc-ming.all/loop/simple_loop_test.c
index 776ee6b..5e66d98 100644
--- a/testsuite/misc-ming.all/loop/simple_loop_test.c
+++ b/testsuite/misc-ming.all/loop/simple_loop_test.c
@@ -40,22 +40,12 @@ get_shape(int r, int g, int b)
return sh;
}
-int
-main(int argc, char** argv)
+int main(void)
{
SWFMovie mo;
SWFShape sh;
SWFDisplayItem it;
- const char *srcdir=".";
- if ( argc>1 )
- srcdir=argv[1];
- else
- {
- fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
- return 1;
- }
-
Ming_init();
mo = newSWFMovieWithVersion(OUTPUT_VERSION);
SWFMovie_setDimension(mo, 800, 600);
diff --git a/testsuite/misc-ming.all/sound/StreamSoundTestRunner.cpp
b/testsuite/misc-ming.all/sound/StreamSoundTestRunner.cpp
index b78e08f..3a8c08d 100644
--- a/testsuite/misc-ming.all/sound/StreamSoundTestRunner.cpp
+++ b/testsuite/misc-ming.all/sound/StreamSoundTestRunner.cpp
@@ -46,8 +46,6 @@ main(int /*argc*/, char** /*argv*/)
MovieClip* root = tester.getRootMovie();
assert(root);
- VM& vm = getVM(*getObject(root));
-
const size_t framecount = root->get_frame_count();
// Sanity.
http://git.savannah.gnu.org/cgit//commit/?id=db46a406460391fdf26195c0fa30fbe462eae76a
commit db46a406460391fdf26195c0fa30fbe462eae76a
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:23:46 2011 +0200
Remove unused assigments.
diff --git a/utilities/flvdumper.cpp b/utilities/flvdumper.cpp
index 182a995..09870a4 100644
--- a/utilities/flvdumper.cpp
+++ b/utilities/flvdumper.cpp
@@ -218,7 +218,7 @@ main(int argc, char *argv[])
cout << "FLV Header size: " << headsize << " (should always be
9)" << endl;
}
// Extract all the Tags
- size_t total = st.st_size - sizeof(Flv::flv_header_t);
+ //size_t total = st.st_size - sizeof(Flv::flv_header_t);
while (!ifs.eof()) {
ifs.read(reinterpret_cast<char *>(&previous),
sizeof(Flv::previous_size_t));
if (ifs.gcount() != sizeof(Flv::previous_size_t)) {
@@ -226,7 +226,7 @@ main(int argc, char *argv[])
}
previous = ntohl(previous);
- total -= sizeof(Flv::previous_size_t);
+ //total -= sizeof(Flv::previous_size_t);
if (all) {
cout << "FLV Previous Tag Size was: " << previous << endl;
}
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
}
tag = flv.decodeTagHeader(buf);
flv.dump();
- total -= sizeof(Flv::previous_size_t);
+ //total -= sizeof(Flv::previous_size_t);
size_t bodysize = flv.convert24(tag->bodysize);
if (bodysize == 0) {
cerr << "FLV Tag size is zero, skipping reading packet
body " << bodysize << endl;
@@ -251,7 +251,7 @@ main(int argc, char *argv[])
// if (ifs.gcount() != bodysize) {
// log_error("Couldn't read the entire body");
// }
- total -= bodysize;
+ //total -= bodysize;
switch (tag->type) {
case Flv::TAG_AUDIO:
{
http://git.savannah.gnu.org/cgit//commit/?id=24680bfe7be8759f0ad08186bc052d10fca270c7
commit 24680bfe7be8759f0ad08186bc052d10fca270c7
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:21:43 2011 +0200
Don't assign to pluginsdir.
It's completely unused; extension.cpp does this.
diff --git a/libbase/sharedlib.cpp b/libbase/sharedlib.cpp
index d4f3457..fc93759 100644
--- a/libbase/sharedlib.cpp
+++ b/libbase/sharedlib.cpp
@@ -55,10 +55,6 @@ int lt_dlmakeresident (lt_dlhandle handle);
lt_dlhandle lt_dlopenext (const char *filename);
#endif
-#if defined(_WIN32) || defined(WIN32)
-# define PLUGINSDIR "./"
-#endif
-
namespace gnash {
SharedLib::SharedLib(const std::string& filespec)
@@ -80,14 +76,6 @@ SharedLib::SharedLib(const std::string& filespec, const
std::string& envvar)
#else
# warning "libltdl not enabled in build".
#endif
- std::string pluginsdir;
- char *env = std::getenv (envvar.c_str());
- if (env) {
- pluginsdir = env;
- } else {
- pluginsdir = PLUGINSDIR;
- }
-
}
SharedLib::~SharedLib()
http://git.savannah.gnu.org/cgit//commit/?id=f57b159cbcd4dfc22a34a0714c53ff66ad753b4f
commit f57b159cbcd4dfc22a34a0714c53ff66ad753b4f
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:13:56 2011 +0200
Use a boost array and initialize _width and _height.
It's not obvious where these are initialized otherwise (maybe they
aren't). Also leave a TODO because both width and height are passed in
the ctor.
diff --git a/libmedia/VideoConverter.h b/libmedia/VideoConverter.h
index 6cfdafa..a4539d4 100644
--- a/libmedia/VideoConverter.h
+++ b/libmedia/VideoConverter.h
@@ -20,6 +20,7 @@
#include <boost/noncopyable.hpp>
#include <boost/cstdint.hpp>
+#include <boost/array.hpp>
#include <memory>
namespace gnash {
@@ -74,7 +75,7 @@ struct ImgBuf : public boost::noncopyable
size_t width; // in pixels
size_t height; // in pixels
- size_t stride[4];
+ boost::array<size_t, 4> stride;
FreeFunc dealloc;
};
diff --git a/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
b/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
index 87f1415..6ed0799 100644
--- a/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
@@ -190,7 +190,7 @@ VideoConverterFfmpeg::convert(const ImgBuf& src)
#endif
ret.reset(new ImgBuf(_dst_fmt, dstbuffer, bufsize, src.width,
src.height));
- std::copy(dstpicture.linesize, dstpicture.linesize+4, ret->stride);
+ std::copy(dstpicture.linesize, dstpicture.linesize+4,
ret->stride.begin());
return ret;
}
diff --git a/libmedia/gst/VideoDecoderGst.cpp b/libmedia/gst/VideoDecoderGst.cpp
index 5816dfc..ef71136 100644
--- a/libmedia/gst/VideoDecoderGst.cpp
+++ b/libmedia/gst/VideoDecoderGst.cpp
@@ -50,9 +50,13 @@ VideoDecoderGst::height() const
return _height;
}
+// TODO: either use width and height or remove them!
VideoDecoderGst::VideoDecoderGst(videoCodecType codec_type,
int /*width*/, int /*height*/,
const boost::uint8_t* extradata, size_t extradatasize)
+ :
+ _width(0),
+ _height(0)
{
// init GStreamer. TODO: what about doing this in MediaHandlerGst ctor?
gst_init (NULL, NULL);
http://git.savannah.gnu.org/cgit//commit/?id=a5b32638c76501a57c62e0414efb18bed39bb3ca
commit a5b32638c76501a57c62e0414efb18bed39bb3ca
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:13:23 2011 +0200
Use empty() not size().
diff --git a/libcore/SWFStream.cpp b/libcore/SWFStream.cpp
index 18a25e6..aad66c8 100644
--- a/libcore/SWFStream.cpp
+++ b/libcore/SWFStream.cpp
@@ -504,8 +504,7 @@ SWFStream::seek(unsigned long pos)
unsigned long
SWFStream::get_tag_end_position()
{
- assert(_tagBoundsStack.size() > 0);
-
+ assert(!_tagBoundsStack.empty());
return _tagBoundsStack.back().second;
}
@@ -590,8 +589,7 @@ SWFStream::open_tag()
void
SWFStream::close_tag()
{
-
- assert(_tagBoundsStack.size() > 0);
+ assert(!_tagBoundsStack.empty());
std::streampos endPos = _tagBoundsStack.back().second;
_tagBoundsStack.pop_back();
http://git.savannah.gnu.org/cgit//commit/?id=bceff43749abd7e0d85321621bfedc7ca6b03ff2
commit bceff43749abd7e0d85321621bfedc7ca6b03ff2
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:12:51 2011 +0200
Initialize _glWidget
It keeps cppcheck happy.
diff --git a/gui/qt/Qt4Glue.cpp b/gui/qt/Qt4Glue.cpp
index 9d3d0db..83f05eb 100644
--- a/gui/qt/Qt4Glue.cpp
+++ b/gui/qt/Qt4Glue.cpp
@@ -36,6 +36,9 @@ namespace gnash {
/// DrawingWidget implementation
DrawingWidget::DrawingWidget(Qt4Gui& gui)
:
+#ifdef RENDERER_OPENGL
+ _glWidget(0),
+#endif
_gui(gui)
{
}
diff --git a/gui/qt/Qt4Glue.h b/gui/qt/Qt4Glue.h
index 3656cf5..cd08bea 100644
--- a/gui/qt/Qt4Glue.h
+++ b/gui/qt/Qt4Glue.h
@@ -49,6 +49,7 @@ public:
#ifdef RENDERER_OPENGL
QGLWidget* _glWidget;
#endif
+
public slots:
void properties();
http://git.savannah.gnu.org/cgit//commit/?id=dd3969779aa8470fca24de081eb4de909fa586af
commit dd3969779aa8470fca24de081eb4de909fa586af
Author: Benjamin Wolsey <address@hidden>
Date: Tue Aug 9 08:12:08 2011 +0200
Don't assign to an unused variable.
But leave a TODO, as it's evidently supposed to be used.
diff --git a/extensions/mysql/mysql_db.cpp b/extensions/mysql/mysql_db.cpp
index 5ee41c2..232a68b 100644
--- a/extensions/mysql/mysql_db.cpp
+++ b/extensions/mysql/mysql_db.cpp
@@ -318,7 +318,8 @@ mysql_qetData(const fn_call& fn)
// GNASH_REPORT_FUNCTION;
if (fn.nargs > 0) {
- std::string sql = fn.arg(0).to_string();
+ // TODO: maybe use this argument.
+ //std::string sql = fn.arg(0).to_string();
as_object* arr = toObject(fn.arg(1), getVM(fn));
MySQL::query_t qresult;
-----------------------------------------------------------------------
Summary of changes:
extensions/mysql/mysql_db.cpp | 3 +-
gui/qt/Qt4Glue.cpp | 3 +
gui/qt/Qt4Glue.h | 1 +
gui/sdl/sdl_agg_glue.cpp | 2 +-
libbase/ImageIterators.h | 2 +-
libbase/Range2d.h | 96 +++++++++-----------
libbase/extension.cpp | 4 +-
libbase/sharedlib.cpp | 12 ---
libbase/snappingrange.h | 2 +-
libcore/SWFStream.cpp | 6 +-
libmedia/VideoConverter.h | 3 +-
libmedia/ffmpeg/VideoConverterFfmpeg.cpp | 2 +-
libmedia/gst/VideoDecoderGst.cpp | 4 +
testsuite/misc-ming.all/RemoveObject2Test.c | 5 +-
testsuite/misc-ming.all/loop/simple_loop_test.c | 12 +---
.../misc-ming.all/sound/StreamSoundTestRunner.cpp | 2 -
utilities/flvdumper.cpp | 8 +-
17 files changed, 70 insertions(+), 97 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-628-g05bdc96,
Benjamin Wolsey <=