Skip to content

Commit

Permalink
istringstream for BreakPoint parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor403 committed Jan 21, 2021
1 parent 29da9ba commit bd8895b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/Core/Core/PowerPC/BreakPoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ void BreakPoints::AddFromStrings(const TBreakPointsStr& bp_strings)
{
TBreakPoint bp;
std::string flags;
std::stringstream ss;
ss << std::hex << bp_string;
ss >> bp.address;
ss >> flags;
std::istringstream iss(bp_string);
iss >> std::hex >> bp.address;
iss >> flags;
bp.is_enabled = flags.find('n') != flags.npos;
bp.log_on_hit = flags.find('l') != flags.npos;
bp.break_on_hit = flags.find('b') != flags.npos;
Expand Down

0 comments on commit bd8895b

Please sign in to comment.