mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
SymbolDB: Add constructors to Symbol
Allows for much more convenient in-place construction.
This commit is contained in:
parent
a14d8003f4
commit
15d1ae3a8a
@ -37,6 +37,9 @@ struct Symbol
|
||||
Data,
|
||||
};
|
||||
|
||||
Symbol() = default;
|
||||
explicit Symbol(const std::string& name) { Rename(name); }
|
||||
|
||||
void Rename(const std::string& symbol_name);
|
||||
|
||||
std::string name;
|
||||
|
@ -67,12 +67,9 @@ void PPCSymbolDB::AddKnownSymbol(const Core::CPUThreadGuard& guard, u32 startAdd
|
||||
else
|
||||
{
|
||||
// new symbol. run analyze.
|
||||
Common::Symbol tf;
|
||||
tf.Rename(name);
|
||||
tf.type = type;
|
||||
tf.address = startAddr;
|
||||
|
||||
auto& new_symbol = m_functions.emplace(startAddr, std::move(tf)).first->second;
|
||||
auto& new_symbol = m_functions.emplace(startAddr, name).first->second;
|
||||
new_symbol.type = type;
|
||||
new_symbol.address = startAddr;
|
||||
|
||||
if (new_symbol.type == Common::Symbol::Type::Function)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user