Skip to content

Commit

Permalink
Style: Remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AMS21 committed Oct 26, 2023
1 parent 3970dd9 commit 331da1b
Show file tree
Hide file tree
Showing 223 changed files with 672 additions and 673 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
with:
target_repo_url: [email protected]:OpenXRay/xray-16.git
ssh_private_key: ${{ secrets.RABOTYAGA_BITBUCKET_PRIVATE_SSH_KEY }}

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branches:
except:
- /^dependabot\/.*$/

os: linux
os: linux
dist: focal
virt: lxd
group: edge
Expand Down
34 changes: 17 additions & 17 deletions License.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
All source code included with this distribution, unless declared otherwise,
is commercial GSC Game World proprietary code.
All source code included with this distribution, unless declared otherwise,
is commercial GSC Game World proprietary code.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither binary nor source code redistributions may be used for any
commercial purposes.
3. Neither binary nor source code redistributions may be used for any
commercial purposes.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion cmake/FindLZO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FIND_LIBRARY(LZO_LIBRARY
lib64 lib
)

# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
Expand Down
2 changes: 1 addition & 1 deletion doc/design/task_history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TITLE: X-Ray Engine 1.6 task history
nitrocaster: Pavel Kovalenko
+ get rid of STLPort
+ bugs
+ fix lights_hanging_lamp class name in system.ltx (used 'SO_HLAMP', should be 'O_HLAMP')
+ fix lights_hanging_lamp class name in system.ltx (used 'SO_HLAMP', should be 'O_HLAMP')
+ core
+ xrMemory::mem_usage -> mem_usage_impl falls into infinite loop or finds bad nodes
+ stackoverflow when game directory contains too many files (_alloca)
Expand Down
2 changes: 1 addition & 1 deletion doc/design/task_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Highflex: Alex M
- Python scripts for stalker skeleton control rig creation
- game code
- Improve Weapon System ( Additional Animations, Options )

Swartz27: Matthew Swartz
+ Fix blurred text on R4
+ Fix issue #24: Fix overloaded particle system
Expand Down
28 changes: 14 additions & 14 deletions doc/procedure/cpp_code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ its empty inline implementation after the class definition:
public:
virtual ~IServer() = 0;
};

inline IServer::~IServer() {}

Do not mark interface classes with linkage attributes.
Expand Down Expand Up @@ -635,9 +635,9 @@ across compilers.
BAD
#ifndef _XRAY_HPP_
#define _XRAY_HPP_

// The XRay.hpp content comes here

#endif // _XRAY_HPP_
GOOD
#pragma once
Expand Down Expand Up @@ -773,15 +773,15 @@ that flags can be grouped under another one new flag:
#if !defined(DEDICATED_SERVER) && defined(CONFIG_SHOW_LOGO_WINDOW)
DestroyWindow(logoWindow);
#endif

Use using instead of typedef:
BAD
typedef void (*FunctionType)(double);
typedef Vector3<float> vector3f;
GOOD
using FunctionType = void (*)(double);
using vector3f = Vector3<float>;

Use strongly typed enums instead of plain C enums:
BAD
enum CmdStatus
Expand All @@ -797,7 +797,7 @@ Use strongly typed enums instead of plain C enums:
InProgress,
Failed,
};

Enums that can be serialized should have values assigned:
BAD
enum class CmdStatus
Expand Down Expand Up @@ -919,7 +919,7 @@ code fragments, put a comment line.
BAD
for (auto &item : items)
storage.push_back(item);

if (!storage.size())
Log("! ERROR: No items found");
GOOD
Expand All @@ -945,15 +945,15 @@ compiles standalone without any dependency on includes before it.
#pragma once
#include "Config.hpp"
... Put here minimal includes required by Foo.hpp ...

... Put here your declarations ...

Foo.cpp template
------------------------------
#include "Config.hpp"
#include "Foo.hpp"
... Put here minimal includes required by Foo.cpp ...

... Put here your code ...

GOOD (using precompiled headers)
Expand All @@ -962,22 +962,22 @@ compiles standalone without any dependency on includes before it.
#pragma once
#include "Config.hpp"
... Put here additional includes ...

Foo.hpp template
------------------------------
#pragma once
#include "Config.hpp"
... Put here minimal includes required by Foo.hpp ...

... Put here your declarations ...

Foo.cpp template
------------------------------
#include "stdafx.hpp"
#include "Config.hpp"
#include "Foo.hpp"
... Put here minimal includes required by Foo.cpp ...

... Put here your code ...

Use #include "Foo.hpp" for headers in the same directory as the source
Expand Down
6 changes: 3 additions & 3 deletions misc/docker/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Then start a new terminal session (or reboot the machine).
Download and install [Docker Desktop](https://download.docker.com/mac/stable/Docker.dmg).

## Create container
Navigate to directory `xray-16/docker` and run the following to create
Navigate to directory `xray-16/docker` and run the following to create
container:
```shell script
bash create.sh
Expand Down Expand Up @@ -54,7 +54,7 @@ User `user` is used for integration with CLion, don't try to log in as him manua
- In CLion:
1. Open `xray-16` project
2. In `Preferences/Settings` > `Build, Execution, Deployment` > `Toolchains`
create Remote Host and fill paths to the tools (compiler, cmake and
create Remote Host and fill paths to the tools (compiler, cmake and
so on) like on the screenshot below:
![Setup toolchain](pics/toolchain.png)
```
Expand All @@ -63,7 +63,7 @@ User `user` is used for integration with CLion, don't try to log in as him manua
```
![Insert credentials](pics/credentials.png)

3. In `Preferences/Settings` > `Build, Execution, Deployment` > `CMake`
3. In `Preferences/Settings` > `Build, Execution, Deployment` > `CMake`
choose `Toolchain` – created above Remote Host:

![Setup cmake](pics/cmake.png)
Expand Down
5 changes: 2 additions & 3 deletions src/Common/NvMender2003/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
========================================================================
STATIC LIBRARY : nv_meshmender
STATIC LIBRARY : nv_meshmender
========================================================================

revision history
Expand All @@ -13,5 +13,4 @@ revision history
- renamed MeshMender::MenderVertex to MeshMender::Vertex since the extra mender was redundant
- added some more comments in the options section with advice on usage
- turned bool parameters into enums so that they aren't easily mixed up.



2 changes: 1 addition & 1 deletion src/Common/PlatformApple.inl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ inline void _splitpath(const char* path, // Path Input
{
if(!path)
return;

const char *p, *end;

if(drive)
Expand Down
2 changes: 1 addition & 1 deletion src/Common/PlatformBSD.inl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ inline void _splitpath(const char* path, // Path Input
{
if(!path)
return;

const char *p, *end;

if(drive)
Expand Down
2 changes: 1 addition & 1 deletion src/Common/PlatformLinux.inl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ inline void _splitpath(const char* path, // Path Input
{
if(!path)
return;

const char *p, *end;

if(drive)
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/D3DXRenderBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void D3DXRenderBase::OnDeviceCreate(const char* shName)
m_WireShader.create("editor" DELIMITER "wire");
m_SelectionShader.create("editor" DELIMITER "selection");
m_PortalFadeShader.create("portal");
m_PortalFadeGeom.create(FVF::F_L, RImplementation.Vertex.Buffer(), 0);
m_PortalFadeGeom.create(FVF::F_L, RImplementation.Vertex.Buffer(), 0);
DUImpl.OnDeviceCreate();
UIRenderImpl.CreateUIGeom();
}
Expand Down
6 changes: 3 additions & 3 deletions src/Layers/xrRender/DetailManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ CDetailManager::CDetailManager() : xrc("detail manager")
cache = (Slot***)xr_malloc(dm_cache_line * sizeof(Slot**));
for (u32 i = 0; i < dm_cache_line; ++i)
cache[i] = (Slot**)xr_malloc(dm_cache_line * sizeof(Slot*));

cache_pool = (Slot *)xr_malloc(dm_cache_size * sizeof(Slot));

for (u32 i = 0; i < dm_cache_size; ++i)
new(&cache_pool[i]) Slot();
/*
CacheSlot1 cache_level1[dm_cache1_line][dm_cache1_line];
Slot* cache [dm_cache_line][dm_cache_line]; // grid-cache itself
Slot cache_pool [dm_cache_size]; // just memory for slots
Slot cache_pool [dm_cache_size]; // just memory for slots
*/
}

Expand Down
8 changes: 4 additions & 4 deletions src/Layers/xrRender/R_Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ECORE_API CBackend
#if defined(USE_DX11)
ref_cbuffer m_aVertexConstants[MaxCBuffers];
ref_cbuffer m_aPixelConstants[MaxCBuffers];

ref_cbuffer m_aGeometryConstants[MaxCBuffers];
ref_cbuffer m_aComputeConstants[MaxCBuffers];

Expand All @@ -87,9 +87,9 @@ class ECORE_API CBackend

D3D_PRIMITIVE_TOPOLOGY m_PrimitiveTopology;
ID3DInputLayout* m_pInputLayout;
u32 dummy0; // Padding to avoid warning
u32 dummy1; // Padding to avoid warning
u32 dummy2; // Padding to avoid warning
u32 dummy0; // Padding to avoid warning
u32 dummy1; // Padding to avoid warning
u32 dummy2; // Padding to avoid warning
#endif
private:
// Render-targets
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/R_Backend_Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void CBackend::set_ClipPlanes(u32 _enable, Fplane* _planes /*=NULL */, u32 count

// Enable them
u32 e_mask = (1 << count) - 1;
CHK_DX(HW.pDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, e_mask));
CHK_DX(HW.pDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, e_mask));
#elif defined(USE_DX11) || defined(USE_OGL)
// TODO: DX11: Implement in the corresponding vertex shaders
// Use this to set up location, were shader setup code will get data
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/ResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ IBlender* CResourceManager::_GetBlender(LPCSTR Name)
Msg("! Shader '%s' not found in library.", Name);
return nullptr;
}

return I->second;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/ResourceManager_Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void simplify_texture(string_path& fn)

SState* CResourceManager::_CreateState(SimulatorStates& state_code)
{
// Search equal state-code
// Search equal state-code
for (SState* C : v_states)
{
SimulatorStates& base = C->state_code;
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/SH_Atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SPS::~SPS()
#else
# error No graphics API selected or enabled!
#endif

RImplementation.Resources->_DeletePS(this);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/SH_Constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ECORE_API CConstant : public xr_resource_named
modeWaveForm
};

public:
public:
Fcolor const_float{ 0.0f, 0.0f, 0.0f, 0.0f };
u32 const_dword{ 0 };

Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/SH_Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ECORE_API CMatrix : public xr_resource_named
tcmFORCE32 = u32(-1)
};

public:
public:
Fmatrix xform{};

u32 dwFrame{ 0 };
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/ShaderResourceTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ inline std::pair<char, GLuint> GLCompileShader(pcstr* buffer, size_t size, pcstr

const GLuint program = glCreateProgram();
R_ASSERT(program);
if (GLEW_VERSION_4_3)
if (GLEW_VERSION_4_3)
CHK_GL(glObjectLabel(GL_PROGRAM, program, -1, name));
CHK_GL(glProgramParameteri(program, GL_PROGRAM_SEPARABLE, (GLint)GL_TRUE));
if (HW.ShaderBinarySupported)
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/SkeletonXSkinXW_CPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void Skin3W(vertRender* D, vertBoned3W* S, u32 vCount, CBoneInstance* Bones)

void Skin4W(vertRender* D, vertBoned4W* S, u32 vCount, CBoneInstance* Bones)
{
xr_parallel_for(TaskRange<u32>(0, vCount), [&](const TaskRange<u32>& range)
xr_parallel_for(TaskRange<u32>(0, vCount), [&](const TaskRange<u32>& range)
{
Fvector P0, N0, P1, N1, P2, N2, P3, N3;
for (u32 i = range.begin(); i != range.end(); ++i)
Expand Down
Loading

0 comments on commit 331da1b

Please sign in to comment.