Just use get_if here instead.
This commit is contained in:
parent
8bbafc4d10
commit
efdb0cb119
1 changed files with 2 additions and 3 deletions
|
@ -73,14 +73,13 @@ namespace gui {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapViewUI::update() {
|
void MapViewUI::update() {
|
||||||
if($gui.has<Textual>($log_to)) {
|
if(auto text = $gui.get_if<Textual>($log_to)) {
|
||||||
auto& text = $gui.get<Textual>($log_to);
|
|
||||||
//BUG: I'm calling this what it is, fix it
|
//BUG: I'm calling this what it is, fix it
|
||||||
wstring log_garbage;
|
wstring log_garbage;
|
||||||
for(auto msg : $messages) {
|
for(auto msg : $messages) {
|
||||||
log_garbage += msg + L"\n";
|
log_garbage += msg + L"\n";
|
||||||
}
|
}
|
||||||
text.update(log_garbage);
|
text->update(log_garbage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue