Author: silene
Date: Mon Apr 13 17:02:25 2009
New Revision: 34872
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34872&view=rev
Log:
A few more occurrences of the ternary bug.
Modified:
trunk/src/dialogs.cpp
trunk/src/show_dialog.cpp
Modified: trunk/src/dialogs.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=34872&r1=34871&r2=34872&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Mon Apr 13 17:02:25 2009
@@ -245,7 +245,8 @@
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;
Modified: trunk/src/show_dialog.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/show_dialog.cpp?rev=34872&r1=34871&r2=34872&view=diff
==============================================================================
--- trunk/src/show_dialog.cpp (original)
+++ trunk/src/show_dialog.cpp Mon Apr 13 17:02:25 2009
@@ -373,7 +373,8 @@
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();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits