Skip to content

Commit

Permalink
Warnings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dorian3d committed Apr 12, 2016
1 parent 0cdb53f commit 7c1ba67
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ option(BUILD_DUtils "Build DUtils (basic c++ functions)." ON)
option(BUILD_DUtilsCV "Build DUtilsCV (OpenCV functions, requires DUtils)." ON)
option(BUILD_DVision "Build DVision (computer vision functions, requires DUtilsCV)." ON)

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()

if(MSVC)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
endif()

if(BUILD_DUtils)
set(HDRS include/DUtils/
include/DUtils/BinaryFile.h include/DUtils/DUtils.h include/DUtils/FileModes.h include/DUtils/Math.hpp
Expand Down
2 changes: 1 addition & 1 deletion include/DVision/BRIEF.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BRIEF
enum Type
{
RANDOM, // random pairs (Calonder's original version)
RANDOM_CLOSE, // random but close pairs (used in GalvezIROS11)
RANDOM_CLOSE // random but close pairs (used in GalvezIROS11)
};

public:
Expand Down
2 changes: 1 addition & 1 deletion src/DUtils/Timestamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ double Timestamp::getFloatTime() const {

string Timestamp::getStringTime() const {
char buf[32];
sprintf(buf, "%.6lf", this->getFloatTime());
sprintf(buf, "%.6f", this->getFloatTime());
return string(buf);
}

Expand Down

0 comments on commit 7c1ba67

Please sign in to comment.