From eac7246943bfaabdafcff7506d479f4cbe1ff0cc Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 14 Jan 2020 22:36:20 +0300 Subject: fix SafeInt usage --- include/pdb/symbol.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') 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 + #include -#include #pragma warning(push, 0) #include #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{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; -- cgit v1.2.3