Ver Fonte

Bug fixing

Panagiotis Christopoulos Charitos há 14 anos atrás
pai
commit
a211f8ba4c
3 ficheiros alterados com 6 adições e 4 exclusões
  1. 1 1
      anki/resource/Material.cpp
  2. 3 1
      anki/util/StringList.cpp
  3. 2 2
      anki/util/Variant.h

+ 1 - 1
anki/resource/Material.cpp

@@ -160,7 +160,7 @@ void Material::parseMaterialTag(const boost::property_tree::ptree& pt)
 
 	if(pass)
 	{
-		passes = StringList::splitString(pass.get(), " ");
+		passes = StringList::splitString(pass.get().c_str(), " ");
 	}
 	else
 	{

+ 3 - 1
anki/util/StringList.cpp

@@ -1,4 +1,5 @@
 #include "anki/util/StringList.h"
+#include <iostream> ///XXX
 #include <boost/tokenizer.hpp>
 #include <boost/foreach.hpp>
 
@@ -51,7 +52,8 @@ StringList StringList::splitString(const Char* s, const Char* seperators)
 
 	Sep sep(seperators);
 	StringList out;
-	Tok tok(String(s), sep);
+	String str(s);
+	Tok tok(str, sep);
 
 	BOOST_FOREACH(const String& s_, tok)
 	{

+ 2 - 2
anki/util/Variant.h

@@ -187,7 +187,7 @@ public:
 	/// Implements the VariantBase::equal
 	bool equal(const BaseType& b) const
 	{
-		if(!areSameType(b))
+		if(!BaseType::areSameType(b))
 		{
 			throw ANKI_EXCEPTION(BaseType::INCOMPATIBLES_ERR);
 		}
@@ -198,7 +198,7 @@ public:
 	/// Implements the VariantBase::copy
 	void copy(const BaseType& b)
 	{
-		if(!areSameType(b))
+		if(!BaseType::areSameType(b))
 		{
 			throw ANKI_EXCEPTION(BaseType::INCOMPATIBLES_ERR);
 		}