Local RAII
This commit is contained in:
@ -984,7 +984,7 @@ void UI::customize()
|
||||
*/
|
||||
void UI::change_panel(int new_size, int small_icons)
|
||||
{
|
||||
char *loc_text = dStrdup(Location->value());
|
||||
std::string loc_text = Location->value();
|
||||
|
||||
// Remove current panel's bars
|
||||
init_sizes();
|
||||
@ -1004,10 +1004,8 @@ void UI::change_panel(int new_size, int small_icons)
|
||||
a_UIcmd_set_buttons_sens(a_UIcmd_get_bw_by_widget(this));
|
||||
|
||||
TopGroup->rearrange();
|
||||
Location->value(loc_text);
|
||||
Location->value(loc_text.c_str());
|
||||
Location->take_focus();
|
||||
|
||||
dFree(loc_text);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user