wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src wassert.cpp wassert.hpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src wassert.cpp wassert.hpp
Date: Sun, 02 Jan 2005 14:26:41 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/01/02 19:14:52

Modified files:
        src            : wassert.cpp wassert.hpp 

Log message:
        Revert to standard assert everywhere, except for Microsoft compiler.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/wassert.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/wassert.hpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: wesnoth/src/wassert.cpp
diff -u wesnoth/src/wassert.cpp:1.1 wesnoth/src/wassert.cpp:1.2
--- wesnoth/src/wassert.cpp:1.1 Fri Dec 31 21:01:37 2004
+++ wesnoth/src/wassert.cpp     Sun Jan  2 19:14:52 2005
@@ -10,6 +10,8 @@
    See the COPYING file for more details.
 */
 
+#ifdef STANDARD_ASSERT_DOES_NOT_WORK
+
 #include "log.hpp"
 
 #include <iostream>
@@ -22,3 +24,5 @@
                *reinterpret_cast<int*>(0) = 5;
        }
 }
+
+#endif
Index: wesnoth/src/wassert.hpp
diff -u wesnoth/src/wassert.hpp:1.1 wesnoth/src/wassert.hpp:1.2
--- wesnoth/src/wassert.hpp:1.1 Fri Dec 31 21:01:37 2004
+++ wesnoth/src/wassert.hpp     Sun Jan  2 19:14:52 2005
@@ -12,6 +12,15 @@
 #ifndef WASSERT_HPP_INCLUDED
 #define WASSERT_HPP_INCLUDED
 
+#ifdef _MSC_VER
+#      define STANDARD_ASSERT_DOES_NOT_WORK
+#endif
+
+#ifdef STANDARD_ASSERT_DOES_NOT_WORK
 void wassert(bool expression);
+#else
+#include <cassert>
+#define wassert assert
+#endif
 
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]