Whitespace fixes
parent
a1d2ca50a8
commit
a47da3fd3f
|
@ -128,14 +128,14 @@ int CSDLFileWrapper::SDLSeek(SDL_RWops *context, int offset, int whence)
|
||||||
default:
|
default:
|
||||||
case RW_SEEK_SET:
|
case RW_SEEK_SET:
|
||||||
{
|
{
|
||||||
auto result = PHYSFS_seek(file, offset);
|
auto result = PHYSFS_seek(file, offset);
|
||||||
return (result != 0) ? offset : -1;
|
return (result != 0) ? offset : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RW_SEEK_CUR:
|
case RW_SEEK_CUR:
|
||||||
{
|
{
|
||||||
int position = offset + PHYSFS_tell(file);
|
int position = offset + PHYSFS_tell(file);
|
||||||
auto result = PHYSFS_seek(file, position);
|
auto result = PHYSFS_seek(file, position);
|
||||||
return (result != 0) ? position : -1;
|
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<PHYSFS_File *>(context->hidden.unknown.data1);
|
PHYSFS_File *file = static_cast<PHYSFS_File *>(context->hidden.unknown.data1);
|
||||||
SDL_memset(ptr, 0, size * maxnum);
|
SDL_memset(ptr, 0, size * maxnum);
|
||||||
|
|
||||||
auto result = PHYSFS_read(file, ptr, size, maxnum);
|
auto result = PHYSFS_read(file, ptr, size, maxnum);
|
||||||
return (result >= 0) ? result : 0;
|
return (result >= 0) ? result : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -286,7 +286,7 @@ CObject* CAutoDestroyer::SearchPlastic()
|
||||||
if (obj == m_object) continue;
|
if (obj == m_object) continue;
|
||||||
if (!obj->Implements(ObjectInterfaceType::Destroyable)) continue;
|
if (!obj->Implements(ObjectInterfaceType::Destroyable)) continue;
|
||||||
if (obj->GetType() == OBJECT_HUMAN || obj->GetType() == OBJECT_TECH) continue;
|
if (obj->GetType() == OBJECT_HUMAN || obj->GetType() == OBJECT_TECH) continue;
|
||||||
|
|
||||||
Math::Vector oPos = obj->GetPosition();
|
Math::Vector oPos = obj->GetPosition();
|
||||||
float dist = Math::Distance(oPos, sPos);
|
float dist = Math::Distance(oPos, sPos);
|
||||||
if ( dist <= 5.0f ) return obj;
|
if ( dist <= 5.0f ) return obj;
|
||||||
|
|
|
@ -947,7 +947,7 @@ void COldObject::Write(CLevelParserLine* line)
|
||||||
|
|
||||||
if ( GetLock() )
|
if ( GetLock() )
|
||||||
line->AddParam("lock", MakeUnique<CLevelParserParam>(GetLock()));
|
line->AddParam("lock", MakeUnique<CLevelParserParam>(GetLock()));
|
||||||
|
|
||||||
if ( !GetActivity() )
|
if ( !GetActivity() )
|
||||||
line->AddParam("activity", MakeUnique<CLevelParserParam>(GetActivity()));
|
line->AddParam("activity", MakeUnique<CLevelParserParam>(GetActivity()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue