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

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

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


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src config.cpp config.hpp filesystem.hpp
Date: Sun, 20 Feb 2005 12:56:15 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/02/20 17:56:15

Modified files:
        src            : config.cpp config.hpp filesystem.hpp 

Log message:
        Move the exception where it belongs (or at least away from where it 
doesn't belong.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/config.cpp.diff?tr1=1.125&tr2=1.126&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/config.hpp.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/filesystem.hpp.diff?tr1=1.31&tr2=1.32&r1=text&r2=text

Patches:
Index: wesnoth/src/config.cpp
diff -u wesnoth/src/config.cpp:1.125 wesnoth/src/config.cpp:1.126
--- wesnoth/src/config.cpp:1.125        Sun Feb 20 15:27:25 2005
+++ wesnoth/src/config.cpp      Sun Feb 20 17:56:14 2005
@@ -1,4 +1,4 @@
-/* $Id: config.cpp,v 1.125 2005/02/20 15:27:25 Sirp Exp $ */
+/* $Id: config.cpp,v 1.126 2005/02/20 17:56:14 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -74,14 +74,6 @@
        return res;
 }
 
-} //end anon namespace
-
-const char* io_exception::what() const throw() {
-       return message.c_str();
-}
-
-namespace {
-
 //this function takes a macro and parses it into the macro followed by its
 //arguments. Arguments are seperated by spaces, but an argument appearing 
inside
 //braces is treated as a single argument.
Index: wesnoth/src/config.hpp
diff -u wesnoth/src/config.hpp:1.53 wesnoth/src/config.hpp:1.54
--- wesnoth/src/config.hpp:1.53 Sun Feb 20 15:27:25 2005
+++ wesnoth/src/config.hpp      Sun Feb 20 17:56:14 2005
@@ -1,4 +1,4 @@
-/* $Id: config.hpp,v 1.53 2005/02/20 15:27:25 Sirp Exp $ */
+/* $Id: config.hpp,v 1.54 2005/02/20 17:56:14 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -41,17 +41,6 @@
 
 bool operator<(const line_source& a, const line_source& b);
 
-//an exception object used when an IO error occurs
-struct io_exception : public std::exception {
-       io_exception() {}
-       io_exception(const std::string& msg) : message(msg) {}
-       virtual ~io_exception() throw() {}
-
-       virtual const char* what() const throw();
-private:
-       std::string message;
-};
-
 struct preproc_define {
        preproc_define() {}
        explicit preproc_define(const std::string& val) : value(val) {}
Index: wesnoth/src/filesystem.hpp
diff -u wesnoth/src/filesystem.hpp:1.31 wesnoth/src/filesystem.hpp:1.32
--- wesnoth/src/filesystem.hpp:1.31     Fri Dec 31 02:21:00 2004
+++ wesnoth/src/filesystem.hpp  Sun Feb 20 17:56:14 2005
@@ -1,4 +1,4 @@
-/* $Id: filesystem.hpp,v 1.31 2004/12/31 02:21:00 ydirson Exp $ */
+/* $Id: filesystem.hpp,v 1.32 2005/02/20 17:56:14 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -18,6 +18,17 @@
 #include <string>
 #include <vector>
 
+//an exception object used when an IO error occurs
+struct io_exception : public std::exception {
+       io_exception() {}
+       io_exception(const std::string& msg) : message(msg) {}
+       virtual ~io_exception() throw() {}
+
+       virtual const char* what() const throw() { return message.c_str(); }
+private:
+       std::string message;
+};
+
 enum FILE_NAME_MODE { ENTIRE_FILE_PATH, FILE_NAME_ONLY };
 
 //function which populates files with all the files and dirs




reply via email to

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