Skip to content

Commit

Permalink
Add reverse vtable name lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Apr 4, 2016
1 parent a49f313 commit 37c81df
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions library/include/VersionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ namespace DFHack
return 0;
return (void*)i->second;
}
bool getVTableName (const void *vtable, std::string &out) const
{
for (auto i = VTables.begin(); i != VTables.end(); ++i)
{
if ((void*)i->second == vtable)
{
out = i->first;
return true;
}
}
return false;
}

void setOS(const OSType os)
{
Expand Down

0 comments on commit 37c81df

Please sign in to comment.