Author: sapient
Date: Wed Apr  4 02:09:33 2007
New Revision: 16582

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16582&view=rev
Log:
silene's patch #712: Fix an ODR violation
(note: feel free to commit patches to svn yourself in the future)

Modified:
    trunk/src/construct_dialog.cpp
    trunk/src/construct_dialog.hpp

Modified: trunk/src/construct_dialog.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/construct_dialog.cpp?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- trunk/src/construct_dialog.cpp (original)
+++ trunk/src/construct_dialog.cpp Wed Apr  4 02:09:33 2007
@@ -98,6 +98,14 @@
 } //end anonymous namespace
 
 namespace gui {
+
+dialog::dimension_measurements::dimension_measurements() :
+       x(-1), y(-1), frame(empty_rect), message(empty_rect), 
textbox(empty_rect)
+{
+       //note: this is not defined in the header file to C++ ODR 
(one-definition rule)
+       //since each inclusion of the header file uses a different version of 
empty_rect 
+       //(unnamed namespace and/or const object defined at declaration time). 
+} 
 
 dialog::dialog(display &disp, const std::string& title, const std::string& 
message,
                                const DIALOG_TYPE type, const std::string& 
dialog_style,

Modified: trunk/src/construct_dialog.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/construct_dialog.hpp?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- trunk/src/construct_dialog.hpp (original)
+++ trunk/src/construct_dialog.hpp Wed Apr  4 02:09:33 2007
@@ -124,9 +124,7 @@
 public:
        enum BUTTON_LOCATION { BUTTON_STANDARD, BUTTON_EXTRA, BUTTON_CHECKBOX, 
BUTTON_CHECKBOX_LEFT };
        struct dimension_measurements {
-               dimension_measurements() : x(-1), y(-1),
-                       frame(empty_rect), message(empty_rect), 
textbox(empty_rect)
-               {}
+               dimension_measurements();
                int x, y;
                SDL_Rect frame, message, textbox;
                unsigned int menu_width;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to