[asterisk-scf-commits] asterisk-scf/release/logger.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Apr 6 13:26:31 CDT 2012


branch "master" has been updated
       via  2082a5fbb9352dfd5dab3f60677af42c81c47765 (commit)
      from  9011f2c7add6f52d4147fc9e6c36555fa1693ffa (commit)

Summary of changes:
 client/src/IceConfigurator.cpp |    4 ++--
 server/src/CMakeLists.txt      |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 2082a5fbb9352dfd5dab3f60677af42c81c47765
Author: David M. Lee <dlee at digium.com>
Date:   Fri Apr 6 13:25:49 2012 -0500

    Fixed sort bug found by Clang.
    
    It wasn't clear that my sort function was doing its job, so I made it
    explicit.

diff --git a/client/src/IceConfigurator.cpp b/client/src/IceConfigurator.cpp
index 85c30cf..4f6e6ec 100644
--- a/client/src/IceConfigurator.cpp
+++ b/client/src/IceConfigurator.cpp
@@ -29,7 +29,7 @@ namespace
  * @param rhs Right hand side.
  * @return True, if lhs < rhs.
  */
-bool operator<(const SourceConfiguration& lhs, const SourceConfiguration& rhs)
+bool sortByName(const SourceConfiguration& lhs, const SourceConfiguration& rhs)
 {
     return lhs.name < rhs.name;
 }
@@ -48,7 +48,7 @@ void IceConfigurator::configured(const Configuration& logConfiguration)
 
     // processing is easier if lists are sorted
     std::sort(oldConfig.begin(), oldConfig.end());
-    std::sort(newConfig.begin(), newConfig.end());
+    std::sort(newConfig.begin(), newConfig.end(), sortByName);
 
     SourceConfigurationSeq::const_iterator newConfigIter = newConfig.begin();
     std::vector<std::string>::const_iterator oldConfigIter = oldConfig.begin();
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 21dbd45..88c21df 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -29,7 +29,7 @@ astscf_component_add_slice_collection_libraries(LoggingServiceLib ASTSCF)
 astscf_component_build_library(LoggingServiceLib STATIC)
 
 # This lib is compiled into a .so, so it needs -fPIC set
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX)
   set_target_properties(LoggingServiceLib PROPERTIES COMPILE_FLAGS -fPIC)
 endif()
 

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


-- 
asterisk-scf/release/logger.git



More information about the asterisk-scf-commits mailing list