style cleanup, use { on newline after function definition.

spelling 'impliment' -> 'implement'
This commit is contained in:
Campbell Barton
2012-02-25 16:49:59 +00:00
parent 6ca7d82932
commit 3fc2fbc333
41 changed files with 243 additions and 148 deletions

View File

@@ -175,7 +175,8 @@ void BL_ActionActuator::ResetStartTime(float curtime)
//SetLocalTime(curtime);
}
CValue* BL_ActionActuator::GetReplica() {
CValue* BL_ActionActuator::GetReplica()
{
BL_ActionActuator* replica = new BL_ActionActuator(*this);//m_float,GetName());
replica->ProcessReplica();
return replica;

View File

@@ -2140,7 +2140,8 @@ KX_IPhysicsController* getPhId(CListValue* sumolist,STR_String busc){//not used
}
KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist){
KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist)
{
for (int j=0;j<sumolist->GetCount();j++)
{

View File

@@ -41,12 +41,14 @@ extern "C" {
#include "BKE_fcurve.h"
}
float BL_ScalarInterpolator::GetValue(float currentTime) const {
float BL_ScalarInterpolator::GetValue(float currentTime) const
{
// XXX 2.4x IPO_GetFloatValue(m_blender_adt, m_channel, currentTime);
return evaluate_fcurve(m_fcu, currentTime);
}
BL_InterpolatorList::BL_InterpolatorList(bAction *action) {
BL_InterpolatorList::BL_InterpolatorList(bAction *action)
{
if(action==NULL)
return;
@@ -59,7 +61,8 @@ BL_InterpolatorList::BL_InterpolatorList(bAction *action) {
}
}
BL_InterpolatorList::~BL_InterpolatorList() {
BL_InterpolatorList::~BL_InterpolatorList()
{
BL_InterpolatorList::iterator i;
for (i = begin(); !(i == end()); ++i) {
delete *i;

View File

@@ -308,7 +308,8 @@ const STR_String & CIntValue::GetText()
CValue* CIntValue::GetReplica() {
CValue* CIntValue::GetReplica()
{
CIntValue* replica = new CIntValue(*this);
replica->ProcessReplica();
replica->m_pstrRep = NULL;

View File

@@ -71,7 +71,8 @@ const STR_String & CListValue::GetText()
CValue* CListValue::GetReplica() {
CValue* CListValue::GetReplica()
{
CListValue* replica = new CListValue(*this);
replica->ProcessReplica();
@@ -214,7 +215,7 @@ CValue* CListValue::Calc(VALUE_OPERATOR op,CValue *val)
//assert(false); // todo: implement me!
static int error_printed = 0;
if (error_printed==0) {
fprintf(stderr, "CValueList::Calc not yet implimented\n");
fprintf(stderr, "CValueList::Calc not yet implemented\n");
error_printed = 1;
}
return NULL;
@@ -227,7 +228,7 @@ CValue* CListValue::CalcFinal(VALUE_DATA_TYPE dtype,
//assert(false); // todo: implement me!
static int error_printed = 0;
if (error_printed==0) {
fprintf(stderr, "CValueList::CalcFinal not yet implimented\n");
fprintf(stderr, "CValueList::CalcFinal not yet implemented\n");
error_printed = 1;
}
return NULL;

View File

@@ -103,7 +103,8 @@ bool COperator1Expr::NeedsRecalculated()
return m_lhs->NeedsRecalculated();
}
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks)
{
CExpression* newlhs = m_lhs->CheckLink(brokenlinks);

View File

@@ -197,7 +197,8 @@ bool COperator2Expr::NeedsRecalculated()
CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks)
{
// if both children are 'dead', return NULL
// if only one child is alive, return that child
// if both childresn are alive, return this

View File

@@ -47,7 +47,8 @@ CVectorValue::CVectorValue(float x,float y,float z, AllocationTYPE alloctype)
m_vec[KX_Z] = m_transformedvec[KX_Z] = z;
}
CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctype) {
CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctype)
{
SetCustomFlag1(false);//FancyOutput=false;
@@ -64,7 +65,8 @@ CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctyp
SetName(name);
}
CVectorValue::CVectorValue(double vec[],AllocationTYPE alloctype) {
CVectorValue::CVectorValue(double vec[],AllocationTYPE alloctype)
{
SetCustomFlag1(false);//FancyOutput=false;
@@ -201,7 +203,8 @@ const STR_String & CVectorValue::GetText()
return gstrVectorStr;
}
CValue* CVectorValue::GetReplica() {
CValue* CVectorValue::GetReplica()
{
CVectorValue* replica = new CVectorValue(*this);
replica->ProcessReplica();
return replica;

View File

@@ -303,7 +303,8 @@ PyAttributeDef SCA_JoystickSensor::Attributes[] = {
const char SCA_JoystickSensor::GetButtonActiveList_doc[] =
"getButtonActiveList\n"
"\tReturns a list containing the indices of the button currently pressed.\n";
PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
PyObject* SCA_JoystickSensor::PyGetButtonActiveList( )
{
SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
PyObject *ls = PyList_New(0);
PyObject *value;
@@ -325,7 +326,8 @@ PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
const char SCA_JoystickSensor::GetButtonStatus_doc[] =
"getButtonStatus(buttonIndex)\n"
"\tReturns a bool of the current pressed state of the specified button.\n";
PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) {
PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args )
{
SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
int index;

View File

@@ -183,7 +183,8 @@ isValid(
SCA_PropertyActuator::
GetReplica() {
GetReplica()
{
SCA_PropertyActuator* replica = new SCA_PropertyActuator(*this);

View File

@@ -54,14 +54,16 @@
#define TEMPERING_SHIFT_T(y) (y << 15)
#define TEMPERING_SHIFT_L(y) (y >> 18)
SCA_RandomNumberGenerator::SCA_RandomNumberGenerator(long seed) {
SCA_RandomNumberGenerator::SCA_RandomNumberGenerator(long seed)
{
// int mti = N + 1; /*unused*/
m_seed = seed;
m_refcount = 1;
SetStartVector();
}
SCA_RandomNumberGenerator::~SCA_RandomNumberGenerator() {
SCA_RandomNumberGenerator::~SCA_RandomNumberGenerator()
{
/* intentionally empty */
}

View File

@@ -72,7 +72,8 @@ KX_NetworkMessageSensor::~KX_NetworkMessageSensor()
{
}
CValue* KX_NetworkMessageSensor::GetReplica() {
CValue* KX_NetworkMessageSensor::GetReplica()
{
// This is the standard sensor implementation of GetReplica
// There may be more network message sensor specific stuff to do here.
CValue* replica = new KX_NetworkMessageSensor(*this);

View File

@@ -104,7 +104,8 @@ KX_FontObject::~KX_FontObject()
//it's handled in KX_Scene::NewRemoveObject
}
CValue* KX_FontObject::GetReplica() {
CValue* KX_FontObject::GetReplica()
{
KX_FontObject* replica = new KX_FontObject(*this);
replica->ProcessReplica();
return replica;
@@ -116,7 +117,8 @@ void KX_FontObject::ProcessReplica()
KX_GetActiveScene()->AddFont(this);
}
int GetFontId (VFont *font) {
int GetFontId (VFont *font)
{
PackedFile *packedfile=NULL;
int fontid = -1;

View File

@@ -34,7 +34,8 @@
#include "MT_Matrix3x3.h"
#include "KX_IScalarInterpolator.h"
void KX_OrientationInterpolator::Execute(float currentTime) const {
void KX_OrientationInterpolator::Execute(float currentTime) const
{
MT_Vector3 eul(m_ipos[0]->GetValue(currentTime),
m_ipos[1]->GetValue(currentTime),
m_ipos[2]->GetValue(currentTime));

View File

@@ -34,7 +34,8 @@
#include "MT_Point3.h"
#include "KX_IScalarInterpolator.h"
void KX_PositionInterpolator::Execute(float currentTime) const {
void KX_PositionInterpolator::Execute(float currentTime) const
{
m_target.setValue(m_ipos[0]->GetValue(currentTime),
m_ipos[1]->GetValue(currentTime),
m_ipos[2]->GetValue(currentTime));

View File

@@ -33,6 +33,7 @@
#include "KX_ScalarInterpolator.h"
#include "KX_IScalarInterpolator.h"
void KX_ScalarInterpolator::Execute(float currentTime) const {
void KX_ScalarInterpolator::Execute(float currentTime) const
{
*m_target = m_ipo->GetValue(currentTime);
}

View File

@@ -34,7 +34,8 @@
#include "MT_Vector3.h"
#include "KX_IScalarInterpolator.h"
void KX_ScalingInterpolator::Execute(float currentTime) const {
void KX_ScalingInterpolator::Execute(float currentTime) const
{
m_target.setValue(m_ipos[0]->GetValue(currentTime),
m_ipos[1]->GetValue(currentTime),
m_ipos[2]->GetValue(currentTime));

View File

@@ -144,7 +144,8 @@ void NG_NetworkScene::RemoveAllObjects()
/**
* get a single network object given its name
*/
NG_NetworkObject* NG_NetworkScene::FindNetworkObject(const STR_String& objname) {
NG_NetworkObject* NG_NetworkScene::FindNetworkObject(const STR_String& objname)
{
NG_NetworkObject *nwobj = NULL;
if (! m_networkdevice->IsOnline()) return nwobj;