]> git.mxchange.org Git - simgear.git/commitdiff
Fix package management compiling with linux
authorThomas Geymayer <tomgey@gmail.com>
Thu, 21 Feb 2013 13:02:45 +0000 (14:02 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 21 Feb 2013 13:03:08 +0000 (14:03 +0100)
simgear/package/CMakeLists.txt
simgear/package/Catalog.cxx
simgear/package/Root.cxx

index 4c41020f4929cd27cdb559667c5373ba93750fa9..7ce1e90c3702ad46c65f9579ff1e5facd9d5002b 100644 (file)
@@ -23,8 +23,8 @@ if (SIMGEAR_SHARED)
     set(APP_LIBS SimGearCore)
 else()
     set(APP_LIBS
-        ${LibArchive_LIBRARIES}
         SimGearCore
+        ${LibArchive_LIBRARIES}
         ${CMAKE_THREAD_LIBS_INIT}
         ${WINSOCK_LIBRARY}
         ${ZLIB_LIBRARY}
index e8a17573b250f623bc0cbab258686a409fa611df..bc9b6e59bbe2797863f8f32de9e7acf4f1bd79fb 100644 (file)
@@ -3,6 +3,7 @@
 #include <simgear/package/Catalog.hxx>
 
 #include <boost/foreach.hpp>
+#include <algorithm>
 #include <fstream>
 #include <cstring>
 
index 780617f7650503ab9c7ee97d7351dcece3824a91..6783b331ed7bc0a698c62023f71ed16d87dd8932 100644 (file)
@@ -78,7 +78,7 @@ Package* Root::getPackageById(const std::string& aName) const
     size_t lastDot = aName.rfind('.');
     
     Package* pkg = NULL;
-    if (lastDot == -1) {
+    if (lastDot == std::string::npos) {
         // naked package ID
         CatalogDict::const_iterator it = m_catalogs.begin();
         for (; it != m_catalogs.end(); ++it) {