Skip to content

Commit

Permalink
Merge branch 'fix-issue-849' of cvvergara/geos into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara authored and Gitea committed Aug 31, 2018
2 parents 8a9600b + 55d8d35 commit 4919f0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/linearref/ExtractLineByLocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/tut/tut_console_reporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class console_reporter : public tut::callback
{
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())
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/tut/tut_cppunit_reporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class cppunit_reporter : public tut::callback
*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;

Expand Down Expand Up @@ -145,7 +145,7 @@ class cppunit_reporter : public tut::callback
}

/* *********************** 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++)
Expand Down
6 changes: 3 additions & 3 deletions tests/xmltester/Stackwalker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -1526,7 +1526,7 @@ static bool GetModuleListPSAPI(ModuleList &modules, DWORD pid, HANDLE hProcess,
free(tt);
free(hMods);

return modules.size() != 0;
return !modules.empty();
} // GetModuleListPSAPI


Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit 4919f0d

Please sign in to comment.