diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-14 22:36:20 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-14 22:38:00 +0300 |
commit | eac7246943bfaabdafcff7506d479f4cbe1ff0cc (patch) | |
tree | d7345a17e10f6b162923bdb89b31dc2298d87d3f /include/pdb/symbol.hpp | |
parent | add SafeInt as a submodule (diff) | |
download | winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.tar.gz winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.zip |
fix SafeInt usage
Diffstat (limited to 'include/pdb/symbol.hpp')
-rw-r--r-- | include/pdb/symbol.hpp | 6 |
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; |