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

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

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


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src sdl_utils.cpp sdl_utils.hpp
Date: Tue, 01 Mar 2005 14:32:16 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/03/01 19:32:16

Modified files:
        src            : sdl_utils.cpp sdl_utils.hpp 

Log message:
        added operator== and operator!= for SDL_Color

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.cpp.diff?tr1=1.72&tr2=1.73&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.hpp.diff?tr1=1.52&tr2=1.53&r1=text&r2=text

Patches:
Index: wesnoth/src/sdl_utils.cpp
diff -u wesnoth/src/sdl_utils.cpp:1.72 wesnoth/src/sdl_utils.cpp:1.73
--- wesnoth/src/sdl_utils.cpp:1.72      Wed Feb  9 23:32:01 2005
+++ wesnoth/src/sdl_utils.cpp   Tue Mar  1 19:32:15 2005
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.cpp,v 1.72 2005/02/09 23:32:01 ydirson Exp $ */
+/* $Id: sdl_utils.cpp,v 1.73 2005/03/01 19:32:15 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -842,6 +842,14 @@
        return !operator==(a,b);
 }
 
+bool operator==(const SDL_Color& a, const SDL_Color& b) {
+       return a.r == b.r && a.g == b.g && a.b == b.b;
+}
+
+bool operator!=(const SDL_Color& a, const SDL_Color& b) {
+       return !operator==(a,b);
+}
+
 void pixel_data::read(const config& cfg) {
        const std::string& red = cfg["red"];
        const std::string& green = cfg["green"];
Index: wesnoth/src/sdl_utils.hpp
diff -u wesnoth/src/sdl_utils.hpp:1.52 wesnoth/src/sdl_utils.hpp:1.53
--- wesnoth/src/sdl_utils.hpp:1.52      Wed Feb  9 23:32:01 2005
+++ wesnoth/src/sdl_utils.hpp   Tue Mar  1 19:32:15 2005
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.hpp,v 1.52 2005/02/09 23:32:01 ydirson Exp $ */
+/* $Id: sdl_utils.hpp,v 1.53 2005/03/01 19:32:15 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -122,6 +122,8 @@
 
 bool operator==(const SDL_Rect& a, const SDL_Rect& b);
 bool operator!=(const SDL_Rect& a, const SDL_Rect& b);
+bool operator==(const SDL_Color& a, const SDL_Color& b);
+bool operator!=(const SDL_Color& a, const SDL_Color& b);
 
 class config; // no need to include config.hpp
 




reply via email to

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