Skip to content

Commit

Permalink
refactor(StackInfo): rename StackInfo.cpp to StackInfoImpl.cpp and si…
Browse files Browse the repository at this point in the history
…mplify decodeSymbolName method
  • Loading branch information
SHIINASAMA committed Jan 8, 2025
1 parent f00620e commit bcfc1fd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ std::string system::StackInfo::decodeSymbolName(const std::string &str) noexcept
auto pos = str.find_first_of('<');
if (pos == std::string::npos) {
return str;
} else {
return str.substr(0, pos);
}
return str.substr(0, pos);
}
8 changes: 6 additions & 2 deletions sese/system/StackInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct SubStackInfo {
};

/// Stack Information
class StackInfo {
class StackInfo final {
public:
/// Create a container to store the current stack information
/// \param limit Stack depth limit
Expand All @@ -53,7 +53,11 @@ class StackInfo {
static uint16_t offset;

protected:
/// This function is used to remove template parameter information on Windows, and to decode symbol names on other systems
/// \brief Decode symbol name
/// \details This function is used to remove template parameter information on Windows,
/// and to decode symbol names on other systems.
/// \param str Symbol name
/// \return Decoded symbol name
static std::string decodeSymbolName(const std::string &str) noexcept;

std::vector<SubStackInfo> stacks;
Expand Down

0 comments on commit bcfc1fd

Please sign in to comment.