[Libreoffice-commits] .: src/lib

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Feb 9 05:15:57 PST 2013


 src/lib/CDRContentCollector.cpp |    2 +-
 src/lib/libcdr_utils.cpp        |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 238768aed4dbd1ae3d679dbd09014c34de2afe03
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Feb 9 14:13:08 2013 +0100

    Some cppcheck cleaning

diff --git a/src/lib/CDRContentCollector.cpp b/src/lib/CDRContentCollector.cpp
index 7b7d267..00c0af4 100644
--- a/src/lib/CDRContentCollector.cpp
+++ b/src/lib/CDRContentCollector.cpp
@@ -239,11 +239,11 @@ void libcdr::CDRContentCollector::_flushCurrentPath()
     WPXPropertyListVector::Iter i(path);
     for (i.rewind(); i.next();)
     {
-      bool ignoreM = false;
       if (!i()["libwpg:path-action"])
         continue;
       if (i()["svg:x"] && i()["svg:y"])
       {
+        bool ignoreM = false;
         x = i()["svg:x"]->getDouble();
         y = i()["svg:y"]->getDouble();
         if (firstPoint)
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 0b9d6f9..5d9fa81 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -333,7 +333,7 @@ void libcdr::writeU8(WPXBinaryData &buffer, const int value)
 
 void libcdr::appendCharacters(WPXString &text, std::vector<unsigned char> characters, unsigned short charset)
 {
-  if (!characters.size())
+  if (characters.empty())
     return;
   static const unsigned short symbolmap [] =
   {
@@ -367,7 +367,7 @@ void libcdr::appendCharacters(WPXString &text, std::vector<unsigned char> charac
     0x23A0, 0x23A4, 0x23A5, 0x23A6, 0x23AB, 0x23AC, 0x23AD, 0x0020  // .. 0xFE
   };
 
-  if (!charset && characters.size())
+  if (!charset && !characters.empty())
     charset = getEncoding(&characters[0], characters.size());
 
   if (charset == 0x02) // SYMBOL


More information about the Libreoffice-commits mailing list