Const-ify Define class
authorHervé Poussineau <hpoussin@reactos.org>
Fri, 19 Oct 2007 13:20:27 +0000 (13:20 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Fri, 19 Oct 2007 13:20:27 +0000 (13:20 +0000)
svn path=/trunk/; revision=29680

reactos/tools/rbuild/define.cpp
reactos/tools/rbuild/project.dtd
reactos/tools/rbuild/rbuild.h

index 9e666bd..03ec411 100644 (file)
@@ -33,7 +33,7 @@ Define::Define ( const Project& project,
 }
 
 Define::Define ( const Project& project,
-                    const Module* module,
+                 const Module* module,
                  const XMLElement& defineNode )
        : project(project),
          module(module),
@@ -43,16 +43,16 @@ Define::Define ( const Project& project,
 }
 
 Define::Define ( const Project& project,
-                    const Module* module,
-                    const std::string name_,
-                    const std::string backend_)
+                 const Module* module,
+                 const std::string& name_,
+                 const std::string& backend_)
        : project(project),
          module(module),
          node(NULL)
 {
        name = name_;
        value = "";
-    backend = backend_;
+       backend = backend_;
 }
 
 Define::~Define ()
@@ -63,13 +63,12 @@ void
 Define::Initialize()
 {
        const XMLAttribute* att = node->GetAttribute ( "name", true );
-       const XMLAttribute* empty = node->GetAttribute ( "empty", false );
-    const XMLAttribute* bck = node->GetAttribute ( "backend", false );
+       const XMLAttribute* bck = node->GetAttribute ( "backend", false );
        assert(att);
        name = att->value;
-    value = node->value;
-    if ( bck ) backend = bck->value;
-       if( empty ) value = " ";
+       value = node->value;
+       if ( bck )
+               backend = bck->value;
 }
 
 void
index 9905a60..fb757c6 100644 (file)
@@ -37,8 +37,6 @@
 <!ELEMENT define (#PCDATA)>
 <!ATTLIST define
        name  %CIdentifier; #REQUIRED
-       value %Text;        #IMPLIED
-       empty (true) #IMPLIED
 >
 
 <!ELEMENT directory (compilationunit*|directory*|group*|cdfile|file*|if*|ifnot*|module+|pch*|xi:include*)+>
index 0026e39..f00745e 100644 (file)
@@ -434,8 +434,8 @@ public:
                 const XMLElement& defineNode );
        Define ( const Project& project,
                 const Module* module,
-                const std::string name_,
-                const std::string backend_ = "" );
+                const std::string& name_,
+                const std::string& backend_ = "" );
        ~Define();
        void ProcessXML();
 private: