Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-05-26 14:44:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-26 14:44:14 +0400
commite93d1ba8e775a481e9a719355b12d4523cabcae1 (patch)
treebf9425fceaabbf1abfea06625b59dc0addccfeeb /source/gameengine/Expressions
parentca4d741ce9865c696ef0e41c0c44dd916974d099 (diff)
Misc warnings
- Removed/Commented some unused vars - CValue::GetPropertyText() could return a temp reference to a variable on the stack, option wasnt used anywhere so removed. - KX_ConstraintWrapper::GetConstraintId allows args but ignored them - KX_ConstraintWrapper::PySetParam didnt return NULL on an error (messing up pythons exceptions). - BLI_natstrcmp didnt return 0 when the while loop exited
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/Value.cpp4
-rw-r--r--source/gameengine/Expressions/Value.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 773fd94a0fb..08249f92902 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -292,15 +292,13 @@ CValue* CValue::GetProperty(const char *inName)
//
// Get text description of property with name <inName>, returns an empty string if there is no property named <inName>
//
-const STR_String& CValue::GetPropertyText(const STR_String & inName,const char *deftext)
+const STR_String& CValue::GetPropertyText(const STR_String & inName)
{
const static STR_String sEmpty("");
CValue *property = GetProperty(inName);
if (property)
return property->GetText();
- else if (deftext)
- return STR_String(deftext);
else
return sEmpty;
}
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 0be76c4f452..29ef19b46c9 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -310,7 +310,7 @@ public:
virtual void SetProperty(const char* name,CValue* ioProperty);
virtual CValue* GetProperty(const char* inName); // Get pointer to a property with name <inName>, returns NULL if there is no property named <inName>
virtual CValue* GetProperty(const STR_String & inName);
- const STR_String& GetPropertyText(const STR_String & inName,const char *deftext=NULL); // Get text description of property with name <inName>, returns an empty string if there is no property named <inName>
+ const STR_String& GetPropertyText(const STR_String & inName); // Get text description of property with name <inName>, returns an empty string if there is no property named <inName>
float GetPropertyNumber(const STR_String& inName,float defnumber);
virtual bool RemoveProperty(const char *inName); // Remove the property named <inName>, returns true if the property was succesfully removed, false if property was not found or could not be removed
virtual vector<STR_String> GetPropertyNames();