Skip to content

Commit 80af3a4

Browse files
committed
Fix shadowing (fixes #141)
1 parent 6926077 commit 80af3a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/boost/stacktrace/safe_dump_to.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace boost { namespace stacktrace {
3535
/// @cond
3636
namespace detail {
3737

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

4141
BOOST_STACKTRACE_FUNCTION std::size_t from_dump(const char* filename, native_frame_ptr_t* out_frames);
@@ -52,7 +52,7 @@ struct this_thread_frames { // struct is required to avoid warning about usage o
5252
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;
5353

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

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

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

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

0 commit comments

Comments
 (0)