Pass virtual_identity by reference

develop
lethosor 2015-10-03 09:27:24 -04:00
parent d343dfd8a0
commit 3f5c002634
2 changed files with 2 additions and 2 deletions

@ -156,7 +156,7 @@ namespace DFHack
/// Get the current top-level view-screen /// Get the current top-level view-screen
DFHACK_EXPORT df::viewscreen *getCurViewscreen(bool skip_dismissed = false); DFHACK_EXPORT df::viewscreen *getCurViewscreen(bool skip_dismissed = false);
DFHACK_EXPORT df::viewscreen *getViewscreenByIdentity(virtual_identity id, int n = 1); DFHACK_EXPORT df::viewscreen *getViewscreenByIdentity(virtual_identity &id, int n = 1);
/// Get the top-most viewscreen of the given type from the top `n` viewscreens (or all viewscreens if n < 1) /// Get the top-most viewscreen of the given type from the top `n` viewscreens (or all viewscreens if n < 1)
/// returns NULL if none match /// returns NULL if none match

@ -1326,7 +1326,7 @@ df::viewscreen *Gui::getCurViewscreen(bool skip_dismissed)
return ws; return ws;
} }
df::viewscreen *Gui::getViewscreenByIdentity (virtual_identity id, int n) df::viewscreen *Gui::getViewscreenByIdentity (virtual_identity &id, int n)
{ {
bool limit = (n > 0); bool limit = (n > 0);
df::viewscreen *screen = Gui::getCurViewscreen(); df::viewscreen *screen = Gui::getCurViewscreen();