diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 08:58:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 08:58:18 +0400 |
commit | 2fb82920059257fd7ac8e33bfe53de13e7ed53bd (patch) | |
tree | cb8de3a839cb9878d0869d4e436a235346109c16 /source/gameengine/Expressions | |
parent | c2a1dcf6218cbd56126a5deb1aeaf212d67e54cb (diff) |
style cleanup
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r-- | source/gameengine/Expressions/BoolValue.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/BoolValue.h | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/FloatValue.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/InputParser.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Expressions/IntValue.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/KX_HashedPtr.h | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/ListValue.cpp | 36 | ||||
-rw-r--r-- | source/gameengine/Expressions/ListValue.h | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/Operator2Expr.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 18 | ||||
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.h | 48 | ||||
-rw-r--r-- | source/gameengine/Expressions/StringValue.h | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/Value.cpp | 12 | ||||
-rw-r--r-- | source/gameengine/Expressions/Value.h | 26 |
14 files changed, 82 insertions, 82 deletions
diff --git a/source/gameengine/Expressions/BoolValue.cpp b/source/gameengine/Expressions/BoolValue.cpp index 40997a25be1..e640923129a 100644 --- a/source/gameengine/Expressions/BoolValue.cpp +++ b/source/gameengine/Expressions/BoolValue.cpp @@ -205,7 +205,7 @@ CValue* CBoolValue::GetReplica() } #ifdef WITH_PYTHON -PyObject* CBoolValue::ConvertValueToPython() +PyObject *CBoolValue::ConvertValueToPython() { return PyBool_FromLong(m_bool != 0); } diff --git a/source/gameengine/Expressions/BoolValue.h b/source/gameengine/Expressions/BoolValue.h index 09e931ea661..64ac0266baf 100644 --- a/source/gameengine/Expressions/BoolValue.h +++ b/source/gameengine/Expressions/BoolValue.h @@ -29,7 +29,7 @@ class CBoolValue : public CPropValue { - //PLUGIN_DECLARE_SERIAL(CBoolValue,CValue) + //PLUGIN_DECLARE_SERIAL(CBoolValue,CValue) public: static const STR_String sTrueString; diff --git a/source/gameengine/Expressions/FloatValue.cpp b/source/gameengine/Expressions/FloatValue.cpp index 403338573e2..c9b59e52ee8 100644 --- a/source/gameengine/Expressions/FloatValue.cpp +++ b/source/gameengine/Expressions/FloatValue.cpp @@ -314,7 +314,7 @@ CValue* CFloatValue::GetReplica() #ifdef WITH_PYTHON -PyObject* CFloatValue::ConvertValueToPython() +PyObject *CFloatValue::ConvertValueToPython() { return PyFloat_FromDouble(m_float); } diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index 58837235d30..bdf4ee4605b 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -543,7 +543,7 @@ CExpression *CParser::Ex(int i) } e1 = Error(errtext); - break; + break; } default: NextSym(); @@ -573,7 +573,7 @@ CExpression* CParser::ProcessText text = intext; - chcount = 0; + chcount = 0; if (text.Length() == 0) { return NULL; } diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp index 2d427440620..12d6e258ddf 100644 --- a/source/gameengine/Expressions/IntValue.cpp +++ b/source/gameengine/Expressions/IntValue.cpp @@ -326,7 +326,7 @@ void CIntValue::SetValue(CValue* newval) #ifdef WITH_PYTHON -PyObject* CIntValue::ConvertValueToPython() +PyObject *CIntValue::ConvertValueToPython() { if ((m_int > INT_MIN) && (m_int < INT_MAX)) return PyLong_FromSsize_t(m_int); diff --git a/source/gameengine/Expressions/KX_HashedPtr.h b/source/gameengine/Expressions/KX_HashedPtr.h index ffc6ff647d5..866689ed203 100644 --- a/source/gameengine/Expressions/KX_HashedPtr.h +++ b/source/gameengine/Expressions/KX_HashedPtr.h @@ -50,7 +50,7 @@ public: inline friend bool operator ==( const CHashedPtr & rhs,const CHashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr; - } + } #ifdef WITH_CXX_GUARDEDALLOC diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp index ef82b9ed8cf..88b0a986a05 100644 --- a/source/gameengine/Expressions/ListValue.cpp +++ b/source/gameengine/Expressions/ListValue.cpp @@ -278,7 +278,7 @@ bool CListValue::IsModified() /* Python interface ---------------------------------------------------- */ /* --------------------------------------------------------------------- */ -static Py_ssize_t listvalue_bufferlen(PyObject* self) +static Py_ssize_t listvalue_bufferlen(PyObject *self) { CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self)); if (list==NULL) @@ -287,7 +287,7 @@ static Py_ssize_t listvalue_bufferlen(PyObject* self) return (Py_ssize_t)list->GetCount(); } -static PyObject* listvalue_buffer_item(PyObject* self, Py_ssize_t index) +static PyObject *listvalue_buffer_item(PyObject *self, Py_ssize_t index) { CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self)); CValue *cval; @@ -309,14 +309,14 @@ static PyObject* listvalue_buffer_item(PyObject* self, Py_ssize_t index) cval= list->GetValue(index); - PyObject* pyobj = cval->ConvertValueToPython(); + PyObject *pyobj = cval->ConvertValueToPython(); if (pyobj) return pyobj; else return cval->GetProxy(); } -static PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex) +static PyObject *listvalue_mapping_subscript(PyObject *self, PyObject *pyindex) { CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self)); if (list==NULL) { @@ -328,7 +328,7 @@ static PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex) { CValue *item = ((CListValue*) list)->FindValue(_PyUnicode_AsString(pyindex)); if (item) { - PyObject* pyobj = item->ConvertValueToPython(); + PyObject *pyobj = item->ConvertValueToPython(); if (pyobj) return pyobj; else @@ -348,7 +348,7 @@ static PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex) /* just slice it into a python list... */ -static PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihigh) +static PyObject *listvalue_buffer_slice(PyObject *self,Py_ssize_t ilow, Py_ssize_t ihigh) { CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self)); if (list==NULL) { @@ -374,17 +374,17 @@ static PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize for (i = ilow, j = 0; i < ihigh; i++, j++) { - PyObject* pyobj = list->GetValue(i)->ConvertValueToPython(); + PyObject *pyobj = list->GetValue(i)->ConvertValueToPython(); if (!pyobj) pyobj = list->GetValue(i)->GetProxy(); PyList_SET_ITEM(newlist, i, pyobj); - } + } return newlist; } /* clist + list, return a list that python owns */ -static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other) +static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other) { CListValue *listval= static_cast<CListValue *>(BGE_PROXY_REF(self)); Py_ssize_t i, numitems, numitems_orig; @@ -560,7 +560,7 @@ PyAttributeDef CListValue::Attributes[] = { { NULL } //Sentinel }; -PyObject* CListValue::Pyappend(PyObject* value) +PyObject *CListValue::Pyappend(PyObject *value) { CValue* objval = ConvertPythonToValue(value, "CList.append(i): CValueList, "); @@ -577,15 +577,15 @@ PyObject* CListValue::Pyappend(PyObject* value) Py_RETURN_NONE; } -PyObject* CListValue::Pyreverse() +PyObject *CListValue::Pyreverse() { std::reverse(m_pValueArray.begin(),m_pValueArray.end()); Py_RETURN_NONE; } -PyObject* CListValue::Pyindex(PyObject *value) +PyObject *CListValue::Pyindex(PyObject *value) { - PyObject* result = NULL; + PyObject *result = NULL; CValue* checkobj = ConvertPythonToValue(value, "val = cList[i]: CValueList, "); if (checkobj==NULL) @@ -612,7 +612,7 @@ PyObject* CListValue::Pyindex(PyObject *value) -PyObject* CListValue::Pycount(PyObject* value) +PyObject *CListValue::Pycount(PyObject *value) { int numfound = 0; @@ -638,17 +638,17 @@ PyObject* CListValue::Pycount(PyObject* value) } /* Matches python dict.get(key, [default]) */ -PyObject* CListValue::Pyget(PyObject *args) +PyObject *CListValue::Pyget(PyObject *args) { char *key; - PyObject* def = Py_None; + PyObject *def = Py_None; if (!PyArg_ParseTuple(args, "s|O:get", &key, &def)) return NULL; CValue *item = FindValue((const char *)key); if (item) { - PyObject* pyobj = item->ConvertValueToPython(); + PyObject *pyobj = item->ConvertValueToPython(); if (pyobj) return pyobj; else @@ -659,7 +659,7 @@ PyObject* CListValue::Pyget(PyObject *args) } -PyObject* CListValue::Pyfrom_id(PyObject* value) +PyObject *CListValue::Pyfrom_id(PyObject *value) { uintptr_t id= (uintptr_t)PyLong_AsVoidPtr(value); diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h index 4d104a4bd3a..20005088310 100644 --- a/source/gameengine/Expressions/ListValue.h +++ b/source/gameengine/Expressions/ListValue.h @@ -64,7 +64,7 @@ public: bool CheckEqual(CValue* first,CValue* second); #ifdef WITH_PYTHON - virtual PyObject* py_repr(void) { + virtual PyObject *py_repr(void) { PyObject *py_proxy= this->GetProxy(); PyObject *py_list= PySequence_List(py_proxy); PyObject *py_string= PyObject_Repr(py_list); diff --git a/source/gameengine/Expressions/Operator2Expr.cpp b/source/gameengine/Expressions/Operator2Expr.cpp index 2224b0ff5e8..d0240b5ec75 100644 --- a/source/gameengine/Expressions/Operator2Expr.cpp +++ b/source/gameengine/Expressions/Operator2Expr.cpp @@ -102,7 +102,7 @@ and m_rhs m_cached_calculate = ffleft->Calc(m_op,ffright); - //if (m_cached_calculate) + //if (m_cached_calculate) // m_cached_calculate->Action(CValue::SETOWNEREXPR,&CVoidValue(this,false,CValue::STACKVALUE)); ffleft->Release(); @@ -163,7 +163,7 @@ bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude) } } - return inside; + return inside; } @@ -241,7 +241,7 @@ CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink if (m_rhs) return Release(m_rhs->AddRef()); -/ +/ */ return Release(); diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index a35cb4f9f69..6bb2f039b5c 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -145,7 +145,7 @@ PyObject *PyObjectPlus::py_base_repr(PyObject *self) // This should be the ent } -PyObject * PyObjectPlus::py_base_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +PyObject *PyObjectPlus::py_base_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyTypeObject *base_type; PyObjectPlus_Proxy *base = NULL; @@ -270,7 +270,7 @@ PyAttributeDef PyObjectPlus::Attributes[] = { -PyObject* PyObjectPlus::pyattr_get_invalid(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *PyObjectPlus::pyattr_get_invalid(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { return PyBool_FromLong(self_v ? 0:1); } @@ -303,7 +303,7 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef * ptr += attrdef->m_offset; if (attrdef->m_length > 1) { - PyObject* resultlist = PyList_New(attrdef->m_length); + PyObject *resultlist = PyList_New(attrdef->m_length); for (unsigned int i=0; i<attrdef->m_length; i++) { switch (attrdef->m_type) { @@ -420,7 +420,7 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef * #ifdef USE_MATHUTILS return Vector_CreatePyObject(val, attrdef->m_imax, Py_NEW, NULL); #else - PyObject* resultlist = PyList_New(attrdef->m_imax); + PyObject *resultlist = PyList_New(attrdef->m_imax); for (unsigned int i=0; i<attrdef->m_imax; i++) { PyList_SET_ITEM(resultlist,i,PyFloat_FromDouble(val[i])); @@ -437,10 +437,10 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef * #ifdef USE_MATHUTILS return Matrix_CreatePyObject(val, attrdef->m_imin, attrdef->m_imax, Py_WRAP, NULL); #else - PyObject* collist = PyList_New(attrdef->m_imin); + PyObject *collist = PyList_New(attrdef->m_imin); for (unsigned int i=0; i<attrdef->m_imin; i++) { - PyObject* col = PyList_New(attrdef->m_imax); + PyObject *col = PyList_New(attrdef->m_imax); for (unsigned int j=0; j<attrdef->m_imax; j++) { PyList_SET_ITEM(col,j,PyFloat_FromDouble(val[j])); @@ -460,7 +460,7 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef * val->getValue(fval); return Vector_CreatePyObject(fval, 3, Py_NEW, NULL); #else - PyObject* resultlist = PyList_New(3); + PyObject *resultlist = PyList_New(3); for (unsigned int i=0; i<3; i++) { PyList_SET_ITEM(resultlist,i,PyFloat_FromDouble((*val)[i])); @@ -1100,7 +1100,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt } if (undoBuffer) free(undoBuffer); - return 0; + return 0; } @@ -1139,7 +1139,7 @@ PyObject *PyObjectPlus::NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v if (!self) { // in case of proxy without reference to game object - PyObject* proxy = reinterpret_cast<PyObject *>PyObject_NEW( PyObjectPlus_Proxy, tp); + PyObject *proxy = reinterpret_cast<PyObject *>PyObject_NEW( PyObjectPlus_Proxy, tp); BGE_PROXY_PYREF(proxy) = false; BGE_PROXY_PYOWNS(proxy) = py_owns; BGE_PROXY_REF(proxy) = NULL; diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index f74ed7db8f7..005bf2f6cb2 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -190,9 +190,9 @@ public: \ * macro is one that also requires a documentation string */ #define KX_PYMETHOD(class_name, method_name) \ - PyObject* Py##method_name(PyObject* args, PyObject* kwds); \ - static PyObject* \ - sPy##method_name(PyObject* self, PyObject* args, PyObject* kwds) { \ + PyObject *Py##method_name(PyObject *args, PyObject *kwds); \ + static PyObject * \ + sPy##method_name(PyObject *self, PyObject *args, PyObject *kwds) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "() - " \ @@ -203,9 +203,9 @@ public: \ } \ #define KX_PYMETHOD_VARARGS(class_name, method_name) \ - PyObject* Py##method_name(PyObject* args); \ + PyObject *Py##method_name(PyObject *args); \ static PyObject* \ - sPy##method_name(PyObject* self, PyObject* args) { \ + sPy##method_name(PyObject *self, PyObject *args) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "() - " \ @@ -215,9 +215,9 @@ public: \ } \ #define KX_PYMETHOD_NOARGS(class_name, method_name) \ - PyObject* Py##method_name(); \ + PyObject *Py##method_name(); \ static PyObject* \ - sPy##method_name(PyObject* self) { \ + sPy##method_name(PyObject *self) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "() - " \ @@ -227,9 +227,9 @@ public: \ } \ #define KX_PYMETHOD_O(class_name, method_name) \ - PyObject* Py##method_name(PyObject* value); \ + PyObject *Py##method_name(PyObject *value); \ static PyObject* \ - sPy##method_name(PyObject* self, PyObject* value) { \ + sPy##method_name(PyObject *self, PyObject *value) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "(value) - " \ @@ -239,9 +239,9 @@ public: \ } \ #define KX_PYMETHOD_DOC(class_name, method_name) \ - PyObject* Py##method_name(PyObject* args, PyObject* kwds); \ + PyObject *Py##method_name(PyObject *args, PyObject *kwds); \ static PyObject* \ - sPy##method_name(PyObject* self, PyObject* args, PyObject* kwds) { \ + sPy##method_name(PyObject *self, PyObject *args, PyObject *kwds) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "(...) - " \ @@ -252,9 +252,9 @@ public: \ static const char method_name##_doc[]; \ #define KX_PYMETHOD_DOC_VARARGS(class_name, method_name) \ - PyObject* Py##method_name(PyObject* args); \ + PyObject *Py##method_name(PyObject *args); \ static PyObject* \ - sPy##method_name(PyObject* self, PyObject* args) { \ + sPy##method_name(PyObject *self, PyObject *args) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "(...) - " \ @@ -266,9 +266,9 @@ public: \ static const char method_name##_doc[]; \ #define KX_PYMETHOD_DOC_O(class_name, method_name) \ - PyObject* Py##method_name(PyObject* value); \ - static PyObject* \ - sPy##method_name(PyObject* self, PyObject* value) { \ + PyObject *Py##method_name(PyObject *value); \ + static PyObject * \ + sPy##method_name(PyObject *self, PyObject *value) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "(value) - " \ @@ -280,9 +280,9 @@ public: \ static const char method_name##_doc[]; \ #define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \ - PyObject* Py##method_name(); \ - static PyObject* \ - sPy##method_name(PyObject* self) { \ + PyObject *Py##method_name(); \ + static PyObject * \ + sPy##method_name(PyObject *self) { \ if(BGE_PROXY_REF(self)==NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ #class_name "." #method_name "() - " \ @@ -315,19 +315,19 @@ public: \ */ #define KX_PYMETHODDEF_DOC(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* args, PyObject* kwds) +PyObject *class_name::Py##method_name(PyObject *args, PyObject *kwds) #define KX_PYMETHODDEF_DOC_VARARGS(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* args) +PyObject *class_name::Py##method_name(PyObject *args) #define KX_PYMETHODDEF_DOC_O(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* value) +PyObject *class_name::Py##method_name(PyObject *value) #define KX_PYMETHODDEF_DOC_NOARGS(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name() +PyObject *class_name::Py##method_name() /** * Attribute management @@ -354,7 +354,7 @@ enum KX_PYATTRIBUTE_ACCESS { struct KX_PYATTRIBUTE_DEF; typedef int (*KX_PYATTRIBUTE_CHECK_FUNCTION)(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); typedef int (*KX_PYATTRIBUTE_SET_FUNCTION)(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); -typedef PyObject* (*KX_PYATTRIBUTE_GET_FUNCTION)(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); +typedef PyObject *(*KX_PYATTRIBUTE_GET_FUNCTION)(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); typedef struct KX_PYATTRIBUTE_DEF { const char *m_name; // name of the python attribute diff --git a/source/gameengine/Expressions/StringValue.h b/source/gameengine/Expressions/StringValue.h index e37b4638a1e..bc102c6e203 100644 --- a/source/gameengine/Expressions/StringValue.h +++ b/source/gameengine/Expressions/StringValue.h @@ -25,7 +25,7 @@ class CStringValue : public CPropValue { - //PLUGIN_DECLARE_SERIAL(CStringValue,CValue) + //PLUGIN_DECLARE_SERIAL(CStringValue,CValue) public: /// Construction / destruction CStringValue(); diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index 6507cc32cf1..bcfb7e92d71 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -340,7 +340,7 @@ vector<STR_String> CValue::GetPropertyNames() // Clear all properties // void CValue::ClearProperties() -{ +{ // Check if we have any properties if (m_pNamedPropertyArray == NULL) return; @@ -530,13 +530,13 @@ PyAttributeDef CValue::Attributes[] = { { NULL } //Sentinel }; -PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef) +PyObject *CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF *attrdef) { CValue * self = static_cast<CValue *> (self_v); return PyUnicode_From_STR_String(self->GetName()); } -CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix) +CValue* CValue::ConvertPythonToValue(PyObject *pyobj, const char *error_prefix) { CValue* vallie = NULL; @@ -551,7 +551,7 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix) Py_ssize_t numitems = PyList_GET_SIZE(pyobj); for (i=0;i<numitems;i++) { - PyObject* listitem = PyList_GetItem(pyobj,i); /* borrowed ref */ + PyObject *listitem = PyList_GetItem(pyobj,i); /* borrowed ref */ CValue* listitemval = ConvertPythonToValue(listitem, error_prefix); if (listitemval) { @@ -597,7 +597,7 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix) } -PyObject* CValue::ConvertKeysToPython(void) +PyObject *CValue::ConvertKeysToPython(void) { if (m_pNamedPropertyArray) { @@ -636,5 +636,5 @@ void CValue::SetColorOperator(VALUE_OPERATOR op) void CValue::SetValue(CValue* newval) { // no one should get here - assertd(newval->GetNumber() == 10121969); + assertd(newval->GetNumber() == 10121969); } diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h index e3b52e80ba6..e0c4daeccd0 100644 --- a/source/gameengine/Expressions/Value.h +++ b/source/gameengine/Expressions/Value.h @@ -218,21 +218,21 @@ public: CValue(); #ifdef WITH_PYTHON - //static PyObject* PyMake(PyObject*,PyObject*); + //static PyObject *PyMake(PyObject *, PyObject *); virtual PyObject *py_repr(void) { return PyUnicode_From_STR_String(GetText()); } - virtual PyObject* ConvertValueToPython() { + virtual PyObject *ConvertValueToPython() { return NULL; } - virtual CValue* ConvertPythonToValue(PyObject* pyobj, const char *error_prefix); + virtual CValue *ConvertPythonToValue(PyObject *pyobj, const char *error_prefix); - static PyObject * pyattr_get_name(void * self, const KX_PYATTRIBUTE_DEF * attrdef); + static PyObject *pyattr_get_name(void * self, const KX_PYATTRIBUTE_DEF * attrdef); - virtual PyObject* ConvertKeysToPython( void ); + virtual PyObject *ConvertKeysToPython( void ); #endif // WITH_PYTHON @@ -250,13 +250,13 @@ public: }; /// Reference Counting - int GetRefCount() + int GetRefCount() { return m_refcount; } // Add a reference to this value - CValue* AddRef() + CValue *AddRef() { // Increase global reference count, used to see at the end of the program // if all CValue-derived classes have been dereferenced to 0 @@ -269,7 +269,7 @@ public: } // Release a reference to this value (when reference count reaches 0, the value is removed from the heap) - int Release() + int Release() { // Decrease global reference count, used to see at the end of the program // if all CValue-derived classes have been dereferenced to 0 @@ -354,16 +354,16 @@ public: virtual void SetCustomFlag2(bool bCustomFlag) { m_ValFlags.CustomFlag2 = bCustomFlag;} virtual bool IsCustomFlag2() { return m_ValFlags.CustomFlag2;} -protected: +protected: virtual void DisableRefCount(); // Disable reference counting for this value - //virtual void AddDataToReplica(CValue* replica); + //virtual void AddDataToReplica(CValue* replica); virtual ~CValue(); private: - // Member variables + // Member variables std::map<STR_String,CValue*>* m_pNamedPropertyArray; // Properties for user/game etc ValueFlags m_ValFlags; // Frequently used flags in a bitfield (low memoryusage) - int m_refcount; // Reference Counter - static double m_sZeroVec[3]; + int m_refcount; // Reference Counter + static double m_sZeroVec[3]; }; |