Skip to content

Commit

Permalink
Fix shadowing (fixes #141)
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed Jun 11, 2024
1 parent 6926077 commit 80af3a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/boost/stacktrace/safe_dump_to.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace boost { namespace stacktrace {
/// @cond
namespace detail {

typedef const void* native_frame_ptr_t; // TODO: change to `typedef void(*native_frame_ptr_t)();`
using native_frame_ptr_t = const void*;
enum helper{ max_frames_dump = 128 };

BOOST_STACKTRACE_FUNCTION std::size_t from_dump(const char* filename, native_frame_ptr_t* out_frames);
Expand All @@ -52,7 +52,7 @@ struct this_thread_frames { // struct is required to avoid warning about usage o
BOOST_NOINLINE BOOST_STACKTRACE_FUNCTION static std::size_t collect(native_frame_ptr_t* out_frames, std::size_t max_frames_count, std::size_t skip) noexcept;

BOOST_NOINLINE static std::size_t safe_dump_to_impl(void* memory, std::size_t size, std::size_t skip) noexcept {
typedef boost::stacktrace::detail::native_frame_ptr_t native_frame_ptr_t;
using boost::stacktrace::detail::native_frame_ptr_t;

if (size < sizeof(native_frame_ptr_t)) {
return 0;
Expand All @@ -66,7 +66,7 @@ struct this_thread_frames { // struct is required to avoid warning about usage o

template <class T>
BOOST_NOINLINE static std::size_t safe_dump_to_impl(T file, std::size_t skip, std::size_t max_depth) noexcept {
typedef boost::stacktrace::detail::native_frame_ptr_t native_frame_ptr_t;
using boost::stacktrace::detail::native_frame_ptr_t;

native_frame_ptr_t buffer[boost::stacktrace::detail::max_frames_dump + 1];
if (max_depth > boost::stacktrace::detail::max_frames_dump) {
Expand Down

0 comments on commit 80af3a4

Please sign in to comment.