aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/pdb
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 /include/pdb
parentadd SafeInt as a submodule (diff)
downloadwinapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.tar.gz
winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.zip
fix SafeInt usage
Diffstat (limited to '')
-rw-r--r--include/pdb/symbol.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/pdb/symbol.hpp b/include/pdb/symbol.hpp
index d9f3f0c..e7ca523 100644
--- a/include/pdb/symbol.hpp
+++ b/include/pdb/symbol.hpp
@@ -8,8 +8,9 @@
#include "address.hpp"
#include "module.hpp"
+#include <SafeInt.hpp>
+
#include <Windows.h>
-#include <safeint.h>
#pragma warning(push, 0)
#include <DbgHelp.h>
#pragma warning(pop)
@@ -70,7 +71,6 @@ private:
static constexpr std::size_t max_buffer_size = sizeof(Raw) + MAX_SYM_NAME - 1;
static std::size_t calc_size(const Raw& raw) {
- using namespace msl::utilities;
try {
return SafeInt<std::size_t>{raw.SizeOfStruct} + raw.NameLen - 1;
} catch (const SafeIntException&) {
@@ -110,7 +110,7 @@ private:
static unsigned long cast_line_number(DWORD raw) {
unsigned long dest = 0;
- if (!msl::utilities::SafeCast(raw, dest))
+ if (!SafeCast(raw, dest))
throw std::runtime_error{"invalid line number"};
return dest;