]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fixed const inconsistencies
authorspog <spog>
Sun, 19 Feb 2006 17:05:45 +0000 (17:05 +0000)
committerspog <spog>
Sun, 19 Feb 2006 17:05:45 +0000 (17:05 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@13 8a3a26a2-13c4-0310-b231-cf6edde360e5

gen.vcproj
makeversion.py
radiant/eclass_def.cpp
radiant/renderstate.cpp

index cda374b4fc5ca03369db721ab5b57c7210049efa..adfba8f8be92bb2d87f0194859f9f6445e5ce180 100644 (file)
                                                Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/>\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath=".\svn.py">\r
+                       </File>\r
                        <File\r
                                RelativePath=".\include\version.default">\r
                        </File>\r
index afc4252c8d40a590803daf5422f4229f08eff049..c66330590ad7a4de969d00f820ead8692afc8314 100644 (file)
@@ -54,25 +54,25 @@ def get_version():
   return (line, major, minor)  
 
 # you can pass an optional message to append to aboutmsg
-def radiant_makeversion(append_about):
+def radiant_makeversion(append_about, root = os.getcwd()):
   (line, major, minor) = get_version()
-  f = open('include/version.h', 'w')
+  f = open(os.path.join(root, 'include/version.h'), 'w')
   f.write('// generated header, see makeversion.py\n')
   f.write('#define RADIANT_VERSION "%s"\n' % line)
   f.write('#define RADIANT_MINOR_VERSION "%s"\n' % minor)
   f.write('#define RADIANT_MAJOR_VERSION "%s"\n' % major)
   f.close()
-  f = open('include/RADIANT_MINOR', 'w')
+  f = open(os.path.join(root, 'include/RADIANT_MINOR'), 'w')
   f.write(minor)
   f.close()
-  f = open('include/RADIANT_MAJOR', 'w')
+  f = open(os.path.join(root, 'include/RADIANT_MAJOR'), 'w')
   f.write(major)
   f.close()
-  f = open('include/version', 'w')
+  f = open(os.path.join(root, 'include/version'), 'w')
   f.write(line)
   f.close()
   # aboutmsg
-  aboutfile = 'include/aboutmsg.default'
+  aboutfile = os.path.join(root, 'include/aboutmsg.default')
   if ( os.environ.has_key('RADIANT_ABOUTMSG') ):
     aboutfile = os.environ['RADIANT_ABOUTMSG']
   line = None
@@ -87,11 +87,14 @@ def radiant_makeversion(append_about):
   if ( not append_about is None ):
     line += append_about
   sys.stdout.write("about: %s\n" % line)
-  f = open('include/aboutmsg.h', 'w')
+  f = open(os.path.join(root, 'include/aboutmsg.h'), 'w')
   f.write('// generated header, see makeversion.py\n')
   f.write('#define RADIANT_ABOUTMSG "%s"\n' % line)
   f.close()
 
 # can be used as module (scons build), or by direct call
 if __name__ == '__main__':
-  radiant_makeversion(None)
+  root = os.path.dirname(__file__)
+  if not os.path.isabs(root):
+    root = os.getcwd()
+  radiant_makeversion(None, root)
index 2e0fc13b33413f926237f86147db584b944aba88..266968a505f80893233eeb70f3f8d51597cb9986 100644 (file)
@@ -168,8 +168,8 @@ void setSpecialLoad(EntityClass *e, const char* pWhat, CopiedString& p)
   // Hydra: removed some amazingly bad cstring usage, whoever wrote that
   // needs to be taken out and shot.
 
-  char *pText = 0;
-  char *where = 0;
+  const char *pText = 0;
+  const char *where = 0;
 
   where = strstr(e->comments(),pWhat);
   if (!where)
index 2660afad21e510dbbf509985eb6210ab9b9aaca5..d3c01de0a9c41ff28d593070144c479fb444d82e 100644 (file)
@@ -1678,7 +1678,7 @@ public:
   {
     ASSERT_MESSAGE(!m_traverseRenderablesMutex, "for-each during traversal");
     m_traverseRenderablesMutex = true;
-    for(Renderables::iterator i = m_renderables.begin(); i != m_renderables.end(); ++i)
+    for(Renderables::const_iterator i = m_renderables.begin(); i != m_renderables.end(); ++i)
     {
       callback(*(*i));
     }