[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-456-g7977cc0 |
Date: |
Fri, 08 Jul 2011 19:21:40 +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 7977cc0a46de7e1e89bbe39ddf2814524af0f8ba (commit)
via 7777050974c32ed4fef6c09267d7cd9a649963ea (commit)
from 6d2424fb88724ef4832e3a070ca0890b54daec13 (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=7977cc0a46de7e1e89bbe39ddf2814524af0f8ba
commit 7977cc0a46de7e1e89bbe39ddf2814524af0f8ba
Author: Benjamin Wolsey <address@hidden>
Date: Fri Jul 8 20:26:24 2011 +0200
Fix some cppcheck warnings.
diff --git a/libcore/TextField.cpp b/libcore/TextField.cpp
index 81cb2a1..5f21451 100644
--- a/libcore/TextField.cpp
+++ b/libcore/TextField.cpp
@@ -273,16 +273,14 @@ TextField::show_cursor(Renderer& renderer, const
SWFMatrix& mat)
size_t
TextField::cursorRecord()
{
- SWF::TextRecord record;
+ if (_textRecords.empty()) return 0;
+
size_t i = 0;
- if (_textRecords.size() != 0) {
- while (i < _textRecords.size() && m_cursor >= _recordStarts[i]) {
- ++i;
- }
- return i-1;
+ while (i < _textRecords.size() && m_cursor >= _recordStarts[i]) {
+ ++i;
}
- return 0;
+ return i - 1;
}
void
@@ -576,7 +574,7 @@ TextField::keyInput(key::code c)
case key::HOME:
while ( linestartit < linestartend && *linestartit <= m_cursor ) {
cur_cursor = *linestartit;
- linestartit++;
+ ++linestartit;
}
m_cursor = cur_cursor;
break;
@@ -596,7 +594,7 @@ TextField::keyInput(key::code c)
case key::UP:
while ( linestartit < linestartend && *linestartit <= m_cursor ) {
cur_cursor = *linestartit;
- linestartit++;
+ ++linestartit;
}
//if there is no previous line
if ( linestartit-_line_starts.begin() - 2 < 0 ) {
@@ -618,7 +616,7 @@ TextField::keyInput(key::code c)
case key::END:
while ( linestartit < linestartend && *linestartit <= m_cursor ) {
- linestartit++;
+ ++linestartit;
}
m_cursor = linestartit != linestartend ? *linestartit - 1 :
_text.size();
break;
@@ -648,7 +646,7 @@ TextField::keyInput(key::code c)
while (linestartit < linestartend &&
*linestartit <= m_cursor ) {
cur_cursor = *linestartit;
- linestartit++;
+ ++linestartit;
}
// linestartit should never be before _line_starts.begin()
@@ -974,9 +972,8 @@ TextField::insertTab(SWF::TextRecord& rec, boost::int32_t&
x, float scale)
std::sort(_tabStops.begin(), _tabStops.end());
- int tab = 0;
if (!_tabStops.empty()) {
- tab = _tabStops.back() + 1;
+ int tab = _tabStops.back() + 1;
for (size_t i = 0; i < tabStops.size(); ++i) {
if (tabStops[i] > x) {
@@ -1829,7 +1826,7 @@ TextField::handleChar(std::wstring::const_iterator& it,
while (linestartit != linestartend &&
*linestartit + 1 <= currentPos)
{
- linestartit++;
+ ++linestartit;
}
_line_starts.insert(linestartit, currentPos);
_recordStarts.push_back(currentPos);
diff --git a/libcore/asobj/Global_as.cpp b/libcore/asobj/Global_as.cpp
index ebdc2b1..31fdd36 100644
--- a/libcore/asobj/Global_as.cpp
+++ b/libcore/asobj/Global_as.cpp
@@ -553,7 +553,7 @@ global_parseint(const fn_call& fn)
if (*it == '-' || *it == '+') {
if (*it == '-') negative = true;
- it++;
+ ++it;
if (it == expr.end()) return as_value(NaN);
}
diff --git a/libcore/parser/SWFMovieDefinition.cpp
b/libcore/parser/SWFMovieDefinition.cpp
index 7174b62..84df363 100644
--- a/libcore/parser/SWFMovieDefinition.cpp
+++ b/libcore/parser/SWFMovieDefinition.cpp
@@ -411,7 +411,7 @@ operator<<(std::ostream& o, const CharacterDictionary& cd)
{
for (CharacterDictionary::CharacterConstIterator it = cd.begin(),
- endIt = cd.end(); it != endIt; it++)
+ endIt = cd.end(); it != endIt; ++it)
{
o << std::endl
<< "Character: " << it->first
diff --git a/libcore/swf/DefineButtonTag.cpp b/libcore/swf/DefineButtonTag.cpp
index 8cf427b..0e29c90 100644
--- a/libcore/swf/DefineButtonTag.cpp
+++ b/libcore/swf/DefineButtonTag.cpp
@@ -356,7 +356,7 @@ ButtonRecord::read(SWFStream& in, TagType t,
movie_definition& m, unsigned long endPos)
{
// caller should check this
- if (in.tell()+1 > endPos)
+ if (in.tell() + 1 > endPos)
{
IF_VERBOSE_MALFORMED_SWF(
log_swferror(_(" premature end of button record input stream, "
@@ -366,17 +366,17 @@ ButtonRecord::read(SWFStream& in, TagType t,
}
in.ensureBytes(1);
- int flags = in.read_u8();
+ boost::uint8_t flags = in.read_u8();
if (!flags) return false;
// Upper 4 bits are:
//
- bool buttonHasBlendMode = flags & (1<<5);
- bool buttonHasFilterList = flags & (1<<4);
- _hitTest = flags & (1<<3);
- _down = flags & (1<<2);
- _over = flags & (1<<1);
- _up = flags & (1<<0);
+ bool buttonHasBlendMode = flags & (1 << 5);
+ bool buttonHasFilterList = flags & (1 << 4);
+ _hitTest = flags & (1 << 3);
+ _down = flags & (1 << 2);
+ _over = flags & (1 << 1);
+ _up = flags & (1 << 0);
if (in.tell() + 2 > endPos) {
IF_VERBOSE_MALFORMED_SWF(
@@ -448,10 +448,10 @@ std::string
computeButtonStatesString(int flags)
{
std::string ret;
- if ( flags & (1<<3) ) ret += "hit";
- if ( flags & (1<<2) ) { if ( ! ret.empty() ) ret += ","; ret += "down"; }
- if ( flags & (1<<1) ) { if ( ! ret.empty() ) ret += ","; ret += "over"; }
- if ( flags & (1<<0) ) { if ( ! ret.empty() ) ret += ","; ret += "up"; }
+ if (flags & (1 << 3)) ret += "hit";
+ if (flags & (1 << 2)) { if (!ret.empty()) ret += ","; ret += "down"; }
+ if (flags & (1 << 1)) { if (!ret.empty()) ret += ","; ret += "over"; }
+ if (flags & (1 << 0)) { if (!ret.empty()) ret += ","; ret += "up"; }
return ret;
}
diff --git a/libcore/vm/ActionExec.cpp b/libcore/vm/ActionExec.cpp
index afdcd88..b74f1fe 100644
--- a/libcore/vm/ActionExec.cpp
+++ b/libcore/vm/ActionExec.cpp
@@ -110,6 +110,7 @@ ActionExec::ActionExec(const action_buffer& abuf,
as_environment& newEnv,
_withStack(),
_scopeStack(),
_func(0),
+ _this_ptr(0),
_initialStackSize(0),
_originalTarget(0),
_origExecSWFVersion(0),
http://git.savannah.gnu.org/cgit//commit/?id=7777050974c32ed4fef6c09267d7cd9a649963ea
commit 7777050974c32ed4fef6c09267d7cd9a649963ea
Author: Benjamin Wolsey <address@hidden>
Date: Fri Jul 8 20:26:00 2011 +0200
Use <ltdl.h>
We now use the system header, so use the convention for that.
diff --git a/libbase/extension.cpp b/libbase/extension.cpp
index 45f29ef..147e829 100644
--- a/libbase/extension.cpp
+++ b/libbase/extension.cpp
@@ -28,9 +28,9 @@
#include <cstring>
#include <iostream>
#include <sys/types.h>
+#include <ltdl.h>
#include "log.h"
-#include "ltdl.h"
#include "sharedlib.h"
#include "extension.h"
diff --git a/libbase/sharedlib.cpp b/libbase/sharedlib.cpp
index c0b87f5..d4f3457 100644
--- a/libbase/sharedlib.cpp
+++ b/libbase/sharedlib.cpp
@@ -42,7 +42,7 @@
# include <libgen.h>
#endif
-#include "ltdl.h"
+#include <ltdl.h>
#include <boost/thread/mutex.hpp>
#if defined(WIN32) || defined(_WIN32)
-----------------------------------------------------------------------
Summary of changes:
libbase/extension.cpp | 2 +-
libbase/sharedlib.cpp | 2 +-
libcore/TextField.cpp | 25 +++++++++++--------------
libcore/asobj/Global_as.cpp | 2 +-
libcore/parser/SWFMovieDefinition.cpp | 2 +-
libcore/swf/DefineButtonTag.cpp | 24 ++++++++++++------------
libcore/vm/ActionExec.cpp | 1 +
7 files changed, 28 insertions(+), 30 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-456-g7977cc0,
Benjamin Wolsey <=