A few more occurrences of the ternary bug.

This commit is contained in:
Guillaume Melquiond 2009-04-13 15:02:25 +00:00
parent db90a225b4
commit 60c2d0e85a
2 changed files with 4 additions and 2 deletions

View file

@ -245,7 +245,8 @@ int get_save_name(display & disp,const std::string& message, const std::string&
const bool has_exit_button, const bool ask_for_filename)
{
static int quit_prompt = 0;
const std::string& tmp_title = (title.empty()) ? _("Save Game") : title;
std::string tmp_title = title;
if (tmp_title.empty()) tmp_title = _("Save Game");
bool ignore_opt = false;
int overwrite=0;
int res=0;

View file

@ -373,7 +373,8 @@ int show_dialog(display& screen, surface image,
const menu::sorter* sorter,
menu::style* menu_style)
{
const std::string& title = (image.null())? caption : "";
std::string title;
if (image.null()) title = caption;
const dialog::style& style = (dialog_style)? *dialog_style : dialog::default_style;
CVideo &disp = screen.video();