From 2caeb4008c8d00b9654bc10129bc201bd6bc47de Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 5 Jan 2015 14:32:04 +0100 Subject: [PATCH] renamed: Util/GitDescription.cpp.in -> Util/git_sha.cpp.in renamed: Util/GitDescription.h -> Util/git_sha.h --- CMakeLists.txt | 7 ++-- Util/DataStoreOptions.h | 4 +-- Util/GitDescription.h | 33 ------------------- Util/ProgramOptions.h | 4 +-- .../{GitDescription.cpp.in => git_sha.cpp.in} | 4 ++- contractor/processing_chain.cpp | 4 +-- data_structures/phantom_node.hpp | 2 +- descriptors/descriptor_base.hpp | 10 ++++-- extractor/extractor.cpp | 6 ++-- routed.cpp | 4 +-- tools/io-benchmark.cpp | 2 +- tools/simpleclient.cpp | 4 +-- tools/springclean.cpp | 4 +-- tools/unlock_all_mutexes.cpp | 4 +-- 14 files changed, 33 insertions(+), 59 deletions(-) delete mode 100644 Util/GitDescription.h rename Util/{GitDescription.cpp.in => git_sha.cpp.in} (94%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 758056f08..4dd3834fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,8 +48,8 @@ add_custom_target(benchmarks DEPENDS rtree-bench) set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread unit_test_framework) configure_file( - ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp.in - ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp + ${CMAKE_SOURCE_DIR}/Util/git_sha.cpp.in + ${CMAKE_SOURCE_DIR}/Util/git_sha.cpp ) file(GLOB ExtractorGlob extractor/*.cpp) file(GLOB ImporterGlob data_structures/import_edge.cpp data_structures/external_memory_node.cpp) @@ -88,7 +88,7 @@ set( ) add_library(COORDINATE OBJECT ${CoordinateGlob}) add_library(FINGERPRINT OBJECT Util/finger_print.cpp) -add_library(GITDESCRIPTION OBJECT Util/GitDescription.cpp) +add_library(GITDESCRIPTION OBJECT Util/git_sha.cpp) add_library(OSRM ${OSRMSources} $ $ $ $ $) add_dependencies(FINGERPRINT FingerPrintConfigure) @@ -139,6 +139,7 @@ endif() # Configuring compilers if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # using Clang + # -Weverything -Wno-c++98-compat set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunreachable-code -pedantic -fPIC") elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(COLOR_FLAG "-fdiagnostics-color=auto") diff --git a/Util/DataStoreOptions.h b/Util/DataStoreOptions.h index f67b12d72..dc2505834 100644 --- a/Util/DataStoreOptions.h +++ b/Util/DataStoreOptions.h @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define DATA_STORE_OPTIONS_H #include "BoostFileSystemFix.h" -#include "GitDescription.h" +#include "git_sha.hpp" #include "IniFileUtil.h" #include "OSRMException.h" #include "simple_logger.hpp" diff --git a/Util/GitDescription.h b/Util/GitDescription.h deleted file mode 100644 index d3a00f49a..000000000 --- a/Util/GitDescription.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - -Copyright (c) 2013, Project OSRM, Dennis Luxen, others -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef GIT_DESCRIPTION_H -#define GIT_DESCRIPTION_H - -extern char g_GIT_DESCRIPTION[]; - -#endif //GIT_DESCRIPTION_H diff --git a/Util/ProgramOptions.h b/Util/ProgramOptions.h index bde9766a6..6da2e7181 100644 --- a/Util/ProgramOptions.h +++ b/Util/ProgramOptions.h @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef PROGAM_OPTIONS_H #define PROGAM_OPTIONS_H -#include "GitDescription.h" +#include "git_sha.hpp" #include "IniFileUtil.h" #include "OSRMException.h" #include "simple_logger.hpp" diff --git a/Util/GitDescription.cpp.in b/Util/git_sha.cpp.in similarity index 94% rename from Util/GitDescription.cpp.in rename to Util/git_sha.cpp.in index 6f4ba7ed3..5b19337e9 100644 --- a/Util/GitDescription.cpp.in +++ b/Util/git_sha.cpp.in @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,5 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "git_sha.hpp" + #define GIT_DESCRIPTION "${GIT_DESCRIPTION}" char g_GIT_DESCRIPTION[] = GIT_DESCRIPTION; diff --git a/contractor/processing_chain.cpp b/contractor/processing_chain.cpp index c5872a878..025a43c37 100644 --- a/contractor/processing_chain.cpp +++ b/contractor/processing_chain.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2014, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../data_structures/static_rtree.hpp" #include "../data_structures/restriction_map.hpp" -#include "../Util/GitDescription.h" +#include "../Util/git_sha.hpp" #include "../Util/graph_loader.hpp" #include "../Util/integer_range.hpp" #include "../Util/lua_util.hpp" diff --git a/data_structures/phantom_node.hpp b/data_structures/phantom_node.hpp index 56393e323..9286fb9b4 100644 --- a/data_structures/phantom_node.hpp +++ b/data_structures/phantom_node.hpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/descriptors/descriptor_base.hpp b/descriptors/descriptor_base.hpp index baa6591d0..31c08eaf1 100644 --- a/descriptors/descriptor_base.hpp +++ b/descriptors/descriptor_base.hpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2014, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -63,11 +63,15 @@ struct DescriptorConfig DescriptorConfig(const OtherT &other) : instructions(other.print_instructions), geometry(other.geometry), encode_geometry(other.compression), - zoom_level(other.zoom_level) { } + zoom_level(other.zoom_level) + { + BOOST_ASSERT(zoom_level >= 0); + } + bool instructions; bool geometry; bool encode_geometry; - unsigned short zoom_level; + short zoom_level; }; template class BaseDescriptor diff --git a/extractor/extractor.cpp b/extractor/extractor.cpp index 75595e200..dbe161979 100644 --- a/extractor/extractor.cpp +++ b/extractor/extractor.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2014, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "restriction_parser.hpp" #include "scripting_environment.hpp" -#include "../Util/GitDescription.h" +#include "../Util/git_sha.hpp" #include "../Util/IniFileUtil.h" #include "../Util/OSRMException.h" #include "../Util/simple_logger.hpp" @@ -181,7 +181,7 @@ int Extractor::Run(int argc, char *argv[]) ExtractionNode result_node; ExtractionWay result_way; - lua_State * local_state = scripting_environment.get_lua_state(); + lua_State * local_state = scripting_environment.get_lua_state(); switch (entity->type()) { diff --git a/routed.cpp b/routed.cpp index 98e45a7a6..1be6dd805 100644 --- a/routed.cpp +++ b/routed.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -27,7 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Library/OSRM.h" #include "Server/Server.h" -#include "Util/GitDescription.h" +#include "Util/git_sha.hpp" #include "Util/ProgramOptions.h" #include "Util/simple_logger.hpp" diff --git a/tools/io-benchmark.cpp b/tools/io-benchmark.cpp index 976752161..6fee3b85e 100644 --- a/tools/io-benchmark.cpp +++ b/tools/io-benchmark.cpp @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../Util/GitDescription.h" +#include "../Util/git_sha.hpp" #include "../Util/OSRMException.h" #include "../Util/simple_logger.hpp" #include "../Util/timing_util.hpp" diff --git a/tools/simpleclient.cpp b/tools/simpleclient.cpp index b6714566a..712811a8b 100644 --- a/tools/simpleclient.cpp +++ b/tools/simpleclient.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -26,7 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../Library/OSRM.h" -#include "../Util/GitDescription.h" +#include "../Util/git_sha.hpp" #include "../Util/ProgramOptions.h" #include "../Util/simple_logger.hpp" diff --git a/tools/springclean.cpp b/tools/springclean.cpp index b67e69521..878940ae2 100644 --- a/tools/springclean.cpp +++ b/tools/springclean.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2014, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../data_structures/shared_memory_factory.hpp" #include "../Server/DataStructures/SharedDataType.h" -#include "../Util/GitDescription.h" +#include "../Util/git_sha.hpp" #include "../Util/simple_logger.hpp" void delete_region(const SharedDataType region) diff --git a/tools/unlock_all_mutexes.cpp b/tools/unlock_all_mutexes.cpp index d448a2049..faef736f7 100644 --- a/tools/unlock_all_mutexes.cpp +++ b/tools/unlock_all_mutexes.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../Util/GitDescription.h" +#include "../Util/git_sha.hpp" #include "../Util/simple_logger.hpp" #include "../Server/DataStructures/SharedBarriers.h"