From a47da3fd3f371b8bbc091f3fd0587c2cb68fbcc0 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 30 Aug 2015 22:18:49 +0200 Subject: [PATCH] Whitespace fixes --- src/common/resources/sdl_file_wrapper.cpp | 8 ++++---- src/object/auto/autodestroyer.cpp | 2 +- src/object/old_object.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/resources/sdl_file_wrapper.cpp b/src/common/resources/sdl_file_wrapper.cpp index 2964550c..27ce7384 100644 --- a/src/common/resources/sdl_file_wrapper.cpp +++ b/src/common/resources/sdl_file_wrapper.cpp @@ -128,14 +128,14 @@ int CSDLFileWrapper::SDLSeek(SDL_RWops *context, int offset, int whence) default: case RW_SEEK_SET: { - auto result = PHYSFS_seek(file, offset); + auto result = PHYSFS_seek(file, offset); return (result != 0) ? offset : -1; } case RW_SEEK_CUR: { int position = offset + PHYSFS_tell(file); - auto result = PHYSFS_seek(file, position); + auto result = PHYSFS_seek(file, position); return (result != 0) ? position : -1; } @@ -158,8 +158,8 @@ int CSDLFileWrapper::SDLRead(SDL_RWops *context, void *ptr, int size, int maxnum PHYSFS_File *file = static_cast(context->hidden.unknown.data1); SDL_memset(ptr, 0, size * maxnum); - auto result = PHYSFS_read(file, ptr, size, maxnum); - return (result >= 0) ? result : 0; + auto result = PHYSFS_read(file, ptr, size, maxnum); + return (result >= 0) ? result : 0; } return 0; diff --git a/src/object/auto/autodestroyer.cpp b/src/object/auto/autodestroyer.cpp index 6681e03f..66df64ee 100644 --- a/src/object/auto/autodestroyer.cpp +++ b/src/object/auto/autodestroyer.cpp @@ -286,7 +286,7 @@ CObject* CAutoDestroyer::SearchPlastic() if (obj == m_object) continue; if (!obj->Implements(ObjectInterfaceType::Destroyable)) continue; if (obj->GetType() == OBJECT_HUMAN || obj->GetType() == OBJECT_TECH) continue; - + Math::Vector oPos = obj->GetPosition(); float dist = Math::Distance(oPos, sPos); if ( dist <= 5.0f ) return obj; diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 3238af89..282ccd66 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -947,7 +947,7 @@ void COldObject::Write(CLevelParserLine* line) if ( GetLock() ) line->AddParam("lock", MakeUnique(GetLock())); - + if ( !GetActivity() ) line->AddParam("activity", MakeUnique(GetActivity()));