aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/utils
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-14 22:36:20 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-14 22:38:00 +0300
commiteac7246943bfaabdafcff7506d479f4cbe1ff0cc (patch)
treed7345a17e10f6b162923bdb89b31dc2298d87d3f /src/utils
parentadd SafeInt as a submodule (diff)
downloadwinapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.tar.gz
winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.zip
fix SafeInt usage
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/file.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/file.cpp b/src/utils/file.cpp
index c25307a..85af444 100644
--- a/src/utils/file.cpp
+++ b/src/utils/file.cpp
@@ -5,8 +5,9 @@
#include "pdb/all.hpp"
+#include <SafeInt.hpp>
+
#include <Windows.h>
-#include <safeint.h>
#include <cstddef>
#include <stdexcept>
@@ -34,7 +35,7 @@ std::size_t get_size(const std::string& path) {
std::size_t result = 0;
- if (!msl::utilities::SafeCast(size.QuadPart, result))
+ if (!SafeCast(size.QuadPart, result))
throw std::runtime_error{"invalid file size"};
return result;