[Scummvm-cvs-logs] SF.net SVN: scummvm:[54903] tools/branches/gsoc2010-decompiler/decompiler/ graph.h

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Tue Dec 14 03:36:04 CET 2010


Revision: 54903
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54903&view=rev
Author:   pidgeot
Date:     2010-12-14 02:36:04 +0000 (Tue, 14 Dec 2010)

Log Message:
-----------
DECOMPIILER: Fix dot escaping for Boost 1.45

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/graph.h

Modified: tools/branches/gsoc2010-decompiler/decompiler/graph.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/graph.h	2010-12-13 21:08:52 UTC (rev 54902)
+++ tools/branches/gsoc2010-decompiler/decompiler/graph.h	2010-12-14 02:36:04 UTC (rev 54903)
@@ -31,6 +31,7 @@
 #include <vector>
 
 #include <boost/format.hpp>
+#include <boost/version.hpp>
 
 #include <boost/graph/graph_traits.hpp>
 #include <boost/graph/adjacency_list.hpp>
@@ -312,18 +313,22 @@
 				if (param != (*inst)->_params.begin())
 					output << ",";
 				output << " ";
-				std::string s = (*param)->getString();
-				for (std::string::iterator it = s.begin(); it != s.end(); ++it)
-					if (*it == '"')
-						output << "\\\"";
-					else if (*it == '|')
-						output << "\\|";
-					else if (*it == '{')
-						output << "\\{";
-					else if (*it == '}')
-						output << "\\}";
-					else
-						output << *it;
+				if (BOOST_VERSION >= 104500)
+					output << *param;
+				else {
+					std::string s = (*param)->getString();
+					for (std::string::iterator it = s.begin(); it != s.end(); ++it)
+						if (*it == '"')
+							output << "\\\"";
+						else if (*it == '|')
+							output << "\\|";
+						else if (*it == '{')
+							output << "\\{";
+						else if (*it == '}')
+							output << "\\}";
+						else
+							output << *it;
+				}
 			}
 			output << boost::format(" (%d)") % (*inst)->_stackChange << "\\n";
 		} while (inst++ != group->_end);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list