[geos-commits] [SCM] GEOS branch master updated. 4919f0d85f0d2aee8cce8e6a59cf019db4335cb6

git at osgeo.org git at osgeo.org
Thu Aug 30 18:40:53 PDT 2018


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 "GEOS".

The branch, master has been updated
       via  4919f0d85f0d2aee8cce8e6a59cf019db4335cb6 (commit)
       via  55d8d35b2a399deb324239573881d947fca49061 (commit)
      from  8a9600bb2e617c788fdcdad8eb9e9045925bbd23 (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 -----------------------------------------------------------------
commit 4919f0d85f0d2aee8cce8e6a59cf019db4335cb6
Merge: 8a9600b 55d8d35
Author: cvvergara <vicky at georepublic.de>
Date:   Thu Aug 30 18:40:53 2018 -0700

    Merge branch 'fix-issue-849' of cvvergara/geos into master


commit 55d8d35b2a399deb324239573881d947fca49061
Author: cvvergara <vicky at georepublic.de>
Date:   Thu Jul 19 08:55:19 2018 -0500

    Closes #849, Using empty() instead of comparing size() vs 0

diff --git a/src/linearref/ExtractLineByLocation.cpp b/src/linearref/ExtractLineByLocation.cpp
index 6acc12b..e044955 100644
--- a/src/linearref/ExtractLineByLocation.cpp
+++ b/src/linearref/ExtractLineByLocation.cpp
@@ -106,7 +106,7 @@ LineString* ExtractLineByLocation::computeLine(const LinearLocation& start, cons
 
 	if (lastSegmentIndex >= coordinates->size())
     {
-        assert(coordinates->size() > 0);
+        assert(!coordinates->isEmpty());
         lastSegmentIndex = coordinates->size() - indexStep;
     }
 
@@ -126,7 +126,7 @@ LineString* ExtractLineByLocation::computeLine(const LinearLocation& start, cons
     }
 
 	// ensure there is at least one coordinate in the result
-	if (newCoordinateArray.size() == 0)
+	if (newCoordinateArray.isEmpty())
     {
 		newCoordinateArray.add(start.getCoordinate(line));
     }
diff --git a/tests/unit/tut/tut_console_reporter.hpp b/tests/unit/tut/tut_console_reporter.hpp
index 28ee4ca..c30459e 100644
--- a/tests/unit/tut/tut_console_reporter.hpp
+++ b/tests/unit/tut/tut_console_reporter.hpp
@@ -160,7 +160,7 @@ public:
     {
         os << std::endl;
 
-        if (not_passed.size() > 0)
+        if (!not_passed.empty())
         {
             not_passed_list::const_iterator i = not_passed.begin();
             while (i != not_passed.end())
diff --git a/tests/unit/tut/tut_cppunit_reporter.hpp b/tests/unit/tut/tut_cppunit_reporter.hpp
index 25d3adb..35e3059 100644
--- a/tests/unit/tut/tut_cppunit_reporter.hpp
+++ b/tests/unit/tut/tut_cppunit_reporter.hpp
@@ -84,7 +84,7 @@ public:
         *stream_ << "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" << std::endl
                  << "<TestRun>" << std::endl;
 
-        if (failed_tests_.size() > 0)
+        if (!failed_tests_.empty())
         {
             *stream_ << "  <FailedTests>" << std::endl;
 
@@ -145,7 +145,7 @@ public:
         }
 
         /* *********************** passed tests ***************************** */
-        if (passed_tests_.size() > 0) {
+        if (!passed_tests_.empty()) {
             *stream_ << "  <SuccessfulTests>" << std::endl;
 
             for (unsigned int i=0; i<passed_tests_.size(); i++)
diff --git a/tests/xmltester/Stackwalker.cpp b/tests/xmltester/Stackwalker.cpp
index 8816d35..e376e11 100644
--- a/tests/xmltester/Stackwalker.cpp
+++ b/tests/xmltester/Stackwalker.cpp
@@ -1435,7 +1435,7 @@ static bool GetModuleListTH32(ModuleList& modules, DWORD pid, FILE *fLogFile)
   CloseHandle(hSnap);
   FreeLibrary(hToolhelp);
 
-  return modules.size() != 0;
+  return !modules.empty();
 }  // GetModuleListTH32
 
 
@@ -1526,7 +1526,7 @@ cleanup:
   free(tt);
   free(hMods);
 
-  return modules.size() != 0;
+  return !modules.empty();
 }  // GetModuleListPSAPI
 
 
@@ -2067,7 +2067,7 @@ static void ShowStackRM( HANDLE hThread, CONTEXT& c, FILE *fLogFile, PREAD_PROCE
 
 
 
-    if ( symSearchPath.size() > 0 ) // if we added anything, we have a trailing semicolon
+    if ( !symSearchPath.empty() ) // if we added anything, we have a trailing semicolon
       symSearchPath = symSearchPath.substr( 0, symSearchPath.size() - 1 );
 
     // why oh why does SymInitialize() want a writeable string?

-----------------------------------------------------------------------

Summary of changes:
 src/linearref/ExtractLineByLocation.cpp | 4 ++--
 tests/unit/tut/tut_console_reporter.hpp | 2 +-
 tests/unit/tut/tut_cppunit_reporter.hpp | 4 ++--
 tests/xmltester/Stackwalker.cpp         | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list