JANITORIAL: Fix ){ -> ) {

This commit is contained in:
Einar Johan Trøan Sømåen 2013-01-24 20:15:13 +01:00
parent 2507b5db8d
commit 5d4d65d6d9
15 changed files with 36 additions and 36 deletions

View File

@ -211,7 +211,7 @@ void MaxTrax::interrupt() {
goto endOfEventLoop;
case 0xA0: // SPECIAL
switch (curEvent->stopTime >> 8){
switch (curEvent->stopTime >> 8) {
case 0x01: // SPECIAL_SYNC
_playerCtx.syncCallBack(curEvent->stopTime & 0xFF);
break;

View File

@ -512,7 +512,7 @@ void Filter::enable_filter(bool enable) {
enabled = enable;
}
void Filter::reset(){
void Filter::reset() {
fc = 0;
res = 0;

View File

@ -153,7 +153,7 @@ void SdlMixerManager::suspendAudio() {
int SdlMixerManager::resumeAudio() {
if (!_audioSuspended)
return -2;
if (SDL_OpenAudio(&_obtained, NULL) < 0){
if (SDL_OpenAudio(&_obtained, NULL) < 0) {
return -1;
}
SDL_PauseAudio(0);

View File

@ -444,7 +444,7 @@ int QuickTimeParser::readELST(Atom atom) {
uint32 offset = 0;
for (uint32 i = 0; i < track->editCount; i++){
for (uint32 i = 0; i < track->editCount; i++) {
track->editList[i].trackDuration = _fd->readUint32BE();
track->editList[i].mediaTime = _fd->readSint32BE();
track->editList[i].mediaRate = Rational(_fd->readUint32BE(), 0x10000);

View File

@ -355,7 +355,7 @@ bool AdTalkHolder::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Item
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Item")==0){
if (strcmp(name, "Item")==0) {
SetItem(value->getString());
return STATUS_OK;
}

View File

@ -57,7 +57,7 @@ public:
Common::RandomSource *getRandomSource() { return _rnd; }
uint32 randInt(int from, int to);
SystemClassRegistry *getClassRegistry(){ return _classReg; }
SystemClassRegistry *getClassRegistry() { return _classReg; }
BaseGame *getGameRef() { return _gameRef; }
BaseFileManager *getFileManager() { return _fileManager; }
static void LOG(bool res, const char *fmt, ...);

View File

@ -80,7 +80,7 @@ public:
}
Common::String getFileNameStr() { return _filename; }
const char* getFileName() { return _filename.c_str(); }
//void SetWidth(int Width){ _width = Width; }
//void SetWidth(int Width) { _width = Width; }
//void SetHeight(int Height){ _height = Height; }
protected:
bool _ckDefault;

View File

@ -622,11 +622,11 @@ bool ScScript::executeInstruction() {
}
/*
ScValue* val = var->getProp(MethodName);
if (val){
if (val) {
dw = GetFuncPos(val->getString());
if (dw==0){
if (dw==0) {
TExternalFunction* f = GetExternal(val->getString());
if (f){
if (f) {
ExternalCall(_stack, _thisStack, f);
}
else{
@ -955,13 +955,13 @@ bool ScScript::executeInstruction() {
/*
if ((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(false);
else if (op1->isNative() && op2->isNative()){
else if (op1->isNative() && op2->isNative()) {
_operand->setBool(op1->getNative() == op2->getNative());
}
else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING) {
_operand->setBool(scumm_stricmp(op1->getString(), op2->getString())==0);
}
else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() == op2->getFloat());
}
else{
@ -979,13 +979,13 @@ bool ScScript::executeInstruction() {
/*
if ((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(true);
else if (op1->isNative() && op2->isNative()){
else if (op1->isNative() && op2->isNative()) {
_operand->setBool(op1->getNative() != op2->getNative());
}
else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING) {
_operand->setBool(scumm_stricmp(op1->getString(), op2->getString())!=0);
}
else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() != op2->getFloat());
}
else{
@ -1002,7 +1002,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() < op2->getFloat());
}
else _operand->setBool(op1->getInt() < op2->getInt());
@ -1017,7 +1017,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() > op2->getFloat());
}
else _operand->setBool(op1->getInt() > op2->getInt());
@ -1032,7 +1032,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() <= op2->getFloat());
}
else _operand->setBool(op1->getInt() <= op2->getInt());
@ -1047,7 +1047,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() >= op2->getFloat());
}
else _operand->setBool(op1->getInt() >= op2->getInt());

View File

@ -224,7 +224,7 @@ bool SXDate::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Name
//////////////////////////////////////////////////////////////////////////
if (name == "Name")==0){
if (name == "Name")==0) {
setName(value->getString());
return STATUS_OK;
}

View File

@ -701,13 +701,13 @@ bool SXFile::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Length")==0){
if (strcmp(name, "Length")==0) {
int origLength = _length;
_length = max(value->getInt(0), 0);
char propName[20];
if (_length < OrigLength){
for(int i=_length; i<OrigLength; i++){
if (_length < OrigLength) {
for(int i=_length; i<OrigLength; i++) {
sprintf(PropName, "%d", i);
_values->DeleteProp(PropName);
}

View File

@ -476,13 +476,13 @@ bool SXMemBuffer::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Length")==0){
if (strcmp(name, "Length")==0) {
int origLength = _length;
_length = max(value->getInt(0), 0);
char propName[20];
if (_length < OrigLength){
for(int i=_length; i<OrigLength; i++){
if (_length < OrigLength) {
for(int i=_length; i<OrigLength; i++) {
sprintf(PropName, "%d", i);
_values->DeleteProp(PropName);
}

View File

@ -242,7 +242,7 @@ bool ScValue::setProp(const char *name, ScValue *val, bool copyWhole, bool setAs
/*
_valIter = _valObject.find(Name);
if (_valIter != _valObject.end()){
if (_valIter != _valObject.end()) {
delete _valIter->_value;
_valIter->_value = NULL;
}

View File

@ -56,27 +56,27 @@ namespace Wintermute {
#define IMPLEMENT_PERSISTENT(className, persistentClass)\
const char className::_className[] = #className;\
void* className::persistBuild(){\
void* className::persistBuild() {\
return ::new className(DYNAMIC_CONSTRUCTOR, DYNAMIC_CONSTRUCTOR);\
}\
\
bool className::persistLoad(void *instance, BasePersistenceManager *persistMgr){\
bool className::persistLoad(void *instance, BasePersistenceManager *persistMgr) {\
return ((className*)instance)->persist(persistMgr);\
}\
\
const char *className::getClassName(){\
const char *className::getClassName() {\
return #className;\
}\
\
/*SystemClass Register##class_name(class_name::_className, class_name::PersistBuild, class_name::PersistLoad, persistent_class);*/\
\
void* className::operator new (size_t size){\
void* className::operator new (size_t size) {\
void* ret = ::operator new(size);\
SystemClassRegistry::getInstance()->registerInstance(#className, ret);\
return ret;\
}\
\
void className::operator delete (void *p){\
void className::operator delete (void *p) {\
SystemClassRegistry::getInstance()->unregisterInstance(#className, p);\
::operator delete(p);\
}\

View File

@ -152,7 +152,7 @@ void InitScalers(uint32 BitFormat) {
g_dotmatrix[12] = g_dotmatrix[14] = format.RGBToColor(63, 63, 63);
}
void DestroyScalers(){
void DestroyScalers() {
#ifdef USE_HQ_SCALERS
free(RGBtoYUV);
RGBtoYUV = 0;

View File

@ -163,7 +163,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st
blockPtr = rowPtr + pixelPtr;
for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {
byte index = stream->readByte();
for (byte pixel_x = 0; pixel_x < 4; pixel_x++){
for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {
byte idx = (index >> (2 * (3 - pixel_x))) & 0x03;
PUT_PIXEL(color4[idx]);
}
@ -177,7 +177,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st
case 0x00:
blockPtr = rowPtr + pixelPtr;
for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {
for (byte pixel_x = 0; pixel_x < 4; pixel_x++){
for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {
// We already have color of upper left pixel
if (pixel_y != 0 || pixel_x != 0)
colorA = stream->readUint16BE();