From 09b9c7c921abbebca4c39af83880957bc6195fbf Mon Sep 17 00:00:00 2001 From: Daniel Warner Date: Sat, 7 Jan 2017 13:41:40 +0000 Subject: [PATCH] Use c++99 --- .travis.yml | 47 +++++++++++++++++++++++++++++++--- CMakeLists.txt | 11 -------- libsgp4/DateTime.h | 2 +- libsgp4/DecayedException.cpp | 4 --- libsgp4/DecayedException.h | 4 --- libsgp4/SGP4.h | 2 +- libsgp4/SatelliteException.cpp | 4 --- libsgp4/SatelliteException.h | 4 --- libsgp4/TimeSpan.h | 2 +- libsgp4/TleException.cpp | 4 --- libsgp4/TleException.h | 4 --- 11 files changed, 46 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index d643309..bb28bce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,47 @@ +sudo: required +dist: precise language: cpp -compiler: - - clang - - gcc + +matrix: + include: + - compiler: gcc + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + env: COMPILER=g++-4.9 + - compiler: gcc + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: COMPILER=g++-5 + - compiler: clang + addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.5 + packages: + - clang-3.5 + env: COMPILER=clang++-3.5 + - compiler: clang + addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.9 + packages: + - clang-3.9 + env: COMPILER=clang++-3.9 + +before_install: + - sudo apt-get update -qq script: - mkdir build - cd build - - cmake .. && make + - cmake -DCMAKE_CXX_COMPILER=$COMPILER .. && make diff --git a/CMakeLists.txt b/CMakeLists.txt index 41d83fc..4d9001a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(SGP4) -include(CheckCXXCompilerFlag) -CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) -CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) -if(COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -elseif(COMPILER_SUPPORTS_CXX0X) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -else() - message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") -endif() - file(GLOB SRCS libsgp4/*.cpp) include_directories(libsgp4) diff --git a/libsgp4/DateTime.h b/libsgp4/DateTime.h index cac0ea6..557011f 100644 --- a/libsgp4/DateTime.h +++ b/libsgp4/DateTime.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "TimeSpan.h" #include "Util.h" diff --git a/libsgp4/DecayedException.cpp b/libsgp4/DecayedException.cpp index 2d344f7..2b4c522 100644 --- a/libsgp4/DecayedException.cpp +++ b/libsgp4/DecayedException.cpp @@ -1,5 +1 @@ #include "DecayedException.h" - -DecayedException::~DecayedException() -{ -} diff --git a/libsgp4/DecayedException.h b/libsgp4/DecayedException.h index 8dc2678..b7c769f 100644 --- a/libsgp4/DecayedException.h +++ b/libsgp4/DecayedException.h @@ -44,10 +44,6 @@ public: { } - DecayedException(const DecayedException&) = default; - - virtual ~DecayedException(); - /** * @returns the date */ diff --git a/libsgp4/SGP4.h b/libsgp4/SGP4.h index cd11d41..7899624 100644 --- a/libsgp4/SGP4.h +++ b/libsgp4/SGP4.h @@ -33,7 +33,7 @@ /** * @brief The simplified perturbations model 4 propagater. */ -class SGP4 final +class SGP4 { public: SGP4(const Tle& tle) diff --git a/libsgp4/SatelliteException.cpp b/libsgp4/SatelliteException.cpp index 841536c..5fe1212 100644 --- a/libsgp4/SatelliteException.cpp +++ b/libsgp4/SatelliteException.cpp @@ -1,5 +1 @@ #include "SatelliteException.h" - -SatelliteException::~SatelliteException() -{ -} diff --git a/libsgp4/SatelliteException.h b/libsgp4/SatelliteException.h index b1e718c..a771a75 100644 --- a/libsgp4/SatelliteException.h +++ b/libsgp4/SatelliteException.h @@ -31,10 +31,6 @@ public: : runtime_error(message) { } - - SatelliteException(const SatelliteException&) = default; - - virtual ~SatelliteException(); }; #endif diff --git a/libsgp4/TimeSpan.h b/libsgp4/TimeSpan.h index 671bc26..21edeff 100644 --- a/libsgp4/TimeSpan.h +++ b/libsgp4/TimeSpan.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include namespace { diff --git a/libsgp4/TleException.cpp b/libsgp4/TleException.cpp index 06c5c52..6a23d01 100644 --- a/libsgp4/TleException.cpp +++ b/libsgp4/TleException.cpp @@ -1,5 +1 @@ #include "TleException.h" - -TleException::~TleException() -{ -} diff --git a/libsgp4/TleException.h b/libsgp4/TleException.h index 034ae5b..5393792 100644 --- a/libsgp4/TleException.h +++ b/libsgp4/TleException.h @@ -37,10 +37,6 @@ public: : runtime_error(message) { } - - TleException(const TleException&) = default; - - virtual ~TleException(); }; #endif