-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d75af0
commit 40a3e29
Showing
5 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 851c1e9..23bd55f 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -288,6 +288,8 @@ target_compile_features( | ||
PRIVATE cxx_std_11 | ||
) | ||
|
||
+target_compile_definitions(${target_name} PRIVATE NOMINMAX) | ||
+ | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") | ||
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") | ||
diff --git a/src/snippets/snippet.cpp b/src/snippets/snippet.cpp | ||
index d9ec4dc..660d375 100644 | ||
--- a/src/snippets/snippet.cpp | ||
+++ b/src/snippets/snippet.cpp | ||
@@ -9,6 +9,7 @@ | ||
#include <iostream> | ||
|
||
#include "../utils/common.hpp" | ||
+#include "../utils/utils.hpp" | ||
|
||
namespace cpptrace { | ||
namespace detail { | ||
@@ -36,7 +37,7 @@ namespace detail { | ||
} | ||
// else load file | ||
file.seekg(0, std::ios::beg); | ||
- contents.resize(size); | ||
+ contents.resize(to<std::size_t>(size)); | ||
if(!file.read(&contents[0], size)) { | ||
// error ... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters