don't define macros that conflict with MinGW system header files, causes very cryptic...
authorRoyce Mitchell III <royce3@ev1.net>
Wed, 5 Jan 2005 02:57:58 +0000 (02:57 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Wed, 5 Jan 2005 02:57:58 +0000 (02:57 +0000)
svn path=/branches/xmlbuildsystem/; revision=12815

12 files changed:
reactos/tools/rbuild/backend/backend.cpp
reactos/tools/rbuild/backend/backend.h
reactos/tools/rbuild/backend/mingw/mingw.cpp
reactos/tools/rbuild/backend/mingw/mingw.h
reactos/tools/rbuild/exception.cpp
reactos/tools/rbuild/exception.h
reactos/tools/rbuild/project.cpp
reactos/tools/rbuild/rbuild.h
reactos/tools/rbuild/test.h
reactos/tools/rbuild/tests/alltests.cpp
reactos/tools/rbuild/tests/moduletest.cpp
reactos/tools/rbuild/tests/projecttest.cpp

index 89e1c42..148a5a5 100644 (file)
@@ -2,8 +2,9 @@
 #pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information\r
 #endif//_MSC_VER\r
 \r
+#include "../Rbuild.h"\r
 #include "backend.h"\r
 \r
-Backend::Backend()\r
+Backend::Backend ( Project& project ) : ProjectNode(project)\r
 {\r
 }\r
index ab8d141..d2c434c 100644 (file)
@@ -6,9 +6,9 @@
 class Backend\r
 {\r
 public:\r
-       Backend();\r
+       Backend ( Project& );\r
 protected:\r
-       Project ProjectNode;\r
+       Project& ProjectNode;\r
 };\r
 \r
 #endif /* __BACKEND_H */\r
index 3d1fc60..f72f780 100644 (file)
@@ -1,11 +1,11 @@
 #ifdef _MSC_VER\r
 #pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information\r
 #endif//_MSC_VER\r
-#if 0\r
+\r
+//#include <stdlib.h> // mingw proves it's insanity once again\r
 #include "mingw.h"\r
 \r
-MingwBackend::MingwBackend(Project project)\r
-       : ProjectNode(project)\r
+MingwBackend::MingwBackend(Project& project)\r
+       : Backend(project)\r
 {\r
 }\r
-#endif\r
index 63be7d0..fe8c989 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef __MINGW_H\r
-#define __MINGW_H\r
-#if 0\r
-#include "backend.h"\r
+#ifndef MINGW_H\r
+#define MINGW_H\r
+\r
+#include "../backend.h"\r
 \r
 class MingwBackend : public Backend\r
 {\r
 public:\r
-       MingwBackend();\r
+       MingwBackend ( Project& );\r
 };\r
-#endif\r
-#endif /* __MINGW_H */\r
+\r
+#endif /* MINGW_H */\r
index ec5a833..3ac9418 100644 (file)
@@ -5,11 +5,13 @@
 #include <stdarg.h>\r
 #include "rbuild.h"\r
 \r
+using std::string;\r
+\r
 Exception::Exception()\r
 {\r
 }\r
 \r
-Exception::Exception(string message)\r
+Exception::Exception(const string& message)\r
 {\r
        Message = message;\r
 }\r
@@ -33,7 +35,7 @@ void Exception::SetMessage(const char* message,
 }\r
 \r
 \r
-FileNotFoundException::FileNotFoundException(string filename)\r
+FileNotFoundException::FileNotFoundException(const string& filename)\r
        : Exception ( "File '%s' not found.", filename.c_str() )\r
 {\r
        Filename = filename;\r
index 94a47e8..8adec17 100644 (file)
@@ -3,15 +3,13 @@
 \r
 #include <string>\r
 \r
-using std::string;\r
-\r
 class Exception\r
 {\r
 public:\r
-       Exception(string message);\r
+       Exception(const std::string& message);\r
        Exception(const char* format,\r
                  ...);\r
-       string Message;\r
+       std::string Message;\r
 protected:\r
        Exception();\r
        void SetMessage(const char* message,\r
@@ -22,8 +20,8 @@ protected:
 class FileNotFoundException : public Exception\r
 {\r
 public:\r
-       FileNotFoundException(string filename);\r
-       string Filename;\r
+       FileNotFoundException(const std::string& filename);\r
+       std::string Filename;\r
 };\r
 \r
 \r
index f4ed30e..9def258 100644 (file)
@@ -11,7 +11,7 @@ Project::Project()
 {\r
 }\r
 \r
-Project::Project(string filename)\r
+Project::Project(const string& filename)\r
 {\r
        if ( !xmlfile.open ( filename ) )\r
                throw FileNotFoundException ( filename );\r
index 6013040..d1d5b93 100644 (file)
@@ -18,7 +18,7 @@ public:
        std::vector<Module*> modules;\r
 \r
        Project ();\r
-       Project ( string filename );\r
+       Project ( const std::string& filename );\r
        ~Project ();\r
        void ProcessXML ( const XMLElement& e, const std::string& path );\r
 private:\r
index fd50f51..3b39786 100644 (file)
@@ -22,12 +22,8 @@ protected:
                      int actual,\r
                      const char* file,\r
                      int line);\r
-       void AreEqual(string expected,\r
-                     string actual,\r
-                     const char* file,\r
-                     int line);\r
-       void AreEqual(const char* expected,\r
-                     string actual,\r
+       void AreEqual(const std::string& expected,\r
+                     const std::string& actual,\r
                      const char* file,\r
                      int line);\r
        void AreNotEqual(int expected,\r
index 04aa801..e4bd899 100644 (file)
@@ -61,8 +61,8 @@ void BaseTest::AreEqual(int expected,
        }\r
 }\r
 \r
-void BaseTest::AreEqual(string expected,\r
-                        string actual,\r
+void BaseTest::AreEqual(const std::string& expected,\r
+                        const std::string& actual,\r
                         const char* file,\r
                         int line)\r
 {\r
@@ -76,17 +76,6 @@ void BaseTest::AreEqual(string expected,
        }\r
 }\r
 \r
-void BaseTest::AreEqual(const char* expected,\r
-                        string actual,\r
-                        const char* file,\r
-                        int line)\r
-{\r
-       AreEqual(string(expected),\r
-             actual,\r
-             file,\r
-             line);\r
-}\r
-\r
 void BaseTest::AreNotEqual(int expected,\r
                            int actual,\r
                            const char* file,\r
index c707bf7..ec7a578 100644 (file)
@@ -1,5 +1,7 @@
 #include "test.h"\r
 \r
+using std::string;\r
+\r
 void ModuleTest::Run()\r
 {\r
        string projectFilename ( "tests/data/module.xml" );\r
index c53dd50..314304f 100644 (file)
@@ -1,5 +1,7 @@
 #include "test.h"\r
 \r
+using std::string;\r
+\r
 void ProjectTest::Run()\r
 {\r
        string projectFilename ( "tests/data/project.xml" );\r