From 180ec92ef982d9fb5c6bdc789f381335f77823c1 Mon Sep 17 00:00:00 2001 From: Thresher <90872694+Bituvo@users.noreply.github.com> Date: Thu, 18 May 2023 14:34:18 -0400 Subject: [PATCH] Remove trailing whitespace (#13505) --- client/shaders/nodes_shader/opengl_fragment.glsl | 2 +- client/shaders/object_shader/opengl_fragment.glsl | 2 +- client/shaders/object_shader/opengl_vertex.glsl | 2 +- doc/world_format.txt | 2 +- games/devtest/mods/lighting/init.lua | 2 +- lib/jsoncpp/json/json-forwards.h | 14 +++++++------- lib/jsoncpp/json/json.h | 14 +++++++------- lib/jsoncpp/jsoncpp.cpp | 14 +++++++------- lib/lua/src/lapi.c | 4 ++-- lib/lua/src/ldblib.c | 2 +- lib/lua/src/ldebug.c | 2 +- lib/lua/src/ldo.c | 2 +- lib/lua/src/lgc.c | 4 ++-- lib/lua/src/llimits.h | 4 ++-- lib/lua/src/loadlib.c | 4 ++-- lib/lua/src/lobject.h | 2 +- lib/lua/src/lopcodes.h | 10 +++++----- lib/lua/src/lstate.c | 2 +- lib/lua/src/lstrlib.c | 2 +- lib/lua/src/ltable.c | 14 +++++++------- lib/lua/src/lua.c | 4 ++-- lib/lua/src/lua.h | 2 +- lib/lua/src/lualib.h | 2 +- lib/lua/src/lvm.c | 2 +- mods/mods_here.txt | 2 +- src/client/hud.cpp | 2 +- src/client/mesh_generator_thread.cpp | 4 ++-- src/client/render/anaglyph.cpp | 2 +- src/client/render/anaglyph.h | 4 ++-- src/client/render/core.cpp | 4 ++-- src/client/render/core.h | 2 +- src/client/render/factory.cpp | 2 +- src/client/render/interlaced.cpp | 2 +- src/client/render/plain.h | 2 +- src/client/render/secondstage.h | 4 ++-- src/client/render/sidebyside.cpp | 2 +- src/client/shadows/dynamicshadows.cpp | 2 +- src/client/tile.cpp | 2 +- src/nodedef.h | 2 +- src/script/lua_api/l_object.h | 2 +- src/texture_override.cpp | 2 +- src/unittest/test_serialization.cpp | 2 +- src/util/numeric.h | 2 +- util/updatepo.sh | 2 +- 44 files changed, 81 insertions(+), 81 deletions(-) diff --git a/client/shaders/nodes_shader/opengl_fragment.glsl b/client/shaders/nodes_shader/opengl_fragment.glsl index d26806fb0..d1f95572b 100644 --- a/client/shaders/nodes_shader/opengl_fragment.glsl +++ b/client/shaders/nodes_shader/opengl_fragment.glsl @@ -20,7 +20,7 @@ uniform float animationTimer; uniform vec4 CameraPos; uniform float xyPerspectiveBias0; uniform float xyPerspectiveBias1; - + varying float adj_shadow_strength; varying float cosLight; varying float f_normal_length; diff --git a/client/shaders/object_shader/opengl_fragment.glsl b/client/shaders/object_shader/opengl_fragment.glsl index 4e80e7fbc..1aadf7004 100644 --- a/client/shaders/object_shader/opengl_fragment.glsl +++ b/client/shaders/object_shader/opengl_fragment.glsl @@ -20,7 +20,7 @@ uniform float animationTimer; uniform vec4 CameraPos; uniform float xyPerspectiveBias0; uniform float xyPerspectiveBias1; - + varying float adj_shadow_strength; varying float cosLight; varying float f_normal_length; diff --git a/client/shaders/object_shader/opengl_vertex.glsl b/client/shaders/object_shader/opengl_vertex.glsl index 4a28ff714..291f50ff5 100644 --- a/client/shaders/object_shader/opengl_vertex.glsl +++ b/client/shaders/object_shader/opengl_vertex.glsl @@ -148,7 +148,7 @@ void main(void) nNormal = normalize(vNormal); cosLight = max(1e-5, dot(nNormal, -v_LightDirection)); float sinLight = pow(1 - pow(cosLight, 2.0), 0.5); - normalOffsetScale = 0.1 * pFactor * pFactor * sinLight * min(f_shadowfar, 500.0) / + normalOffsetScale = 0.1 * pFactor * pFactor * sinLight * min(f_shadowfar, 500.0) / xyPerspectiveBias1 / f_textureresolution; z_bias = 1e3 * sinLight / cosLight * (0.5 + f_textureresolution / 1024.0); } diff --git a/doc/world_format.txt b/doc/world_format.txt index 6f6ee09a4..5b4216fbf 100644 --- a/doc/world_format.txt +++ b/doc/world_format.txt @@ -362,7 +362,7 @@ if map format version >= 29: u8 name_id_mapping_version - Should be zero for map format version 29. - + u16 num_name_id_mappings foreach num_name_id_mappings u16 id diff --git a/games/devtest/mods/lighting/init.lua b/games/devtest/mods/lighting/init.lua index 5fb0f68fe..7b4392fb8 100644 --- a/games/devtest/mods/lighting/init.lua +++ b/games/devtest/mods/lighting/init.lua @@ -119,7 +119,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) lighting[section.n] = state for _,v in ipairs(parameters) do - + if fields[section.n.."."..v.n] then local event = minetest.explode_scrollbar_event(fields[section.n.."."..v.n]) if event.type == "CHG" then diff --git a/lib/jsoncpp/json/json-forwards.h b/lib/jsoncpp/json/json-forwards.h index d3260c57c..74096ca86 100644 --- a/lib/jsoncpp/json/json-forwards.h +++ b/lib/jsoncpp/json/json-forwards.h @@ -7,28 +7,28 @@ // ////////////////////////////////////////////////////////////////////// /* -The JsonCpp library's source code, including accompanying documentation, +The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... -Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, +Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and The JsonCpp Authors, and is released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License - + The full text of the MIT License follows: ======================================================================== diff --git a/lib/jsoncpp/json/json.h b/lib/jsoncpp/json/json.h index 3f4813a95..916b206a2 100644 --- a/lib/jsoncpp/json/json.h +++ b/lib/jsoncpp/json/json.h @@ -6,28 +6,28 @@ // ////////////////////////////////////////////////////////////////////// /* -The JsonCpp library's source code, including accompanying documentation, +The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... -Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, +Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and The JsonCpp Authors, and is released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License - + The full text of the MIT License follows: ======================================================================== diff --git a/lib/jsoncpp/jsoncpp.cpp b/lib/jsoncpp/jsoncpp.cpp index 30e0a69f7..d60fdc66a 100644 --- a/lib/jsoncpp/jsoncpp.cpp +++ b/lib/jsoncpp/jsoncpp.cpp @@ -6,28 +6,28 @@ // ////////////////////////////////////////////////////////////////////// /* -The JsonCpp library's source code, including accompanying documentation, +The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... -Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, +Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and The JsonCpp Authors, and is released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License - + The full text of the MIT License follows: ======================================================================== diff --git a/lib/lua/src/lapi.c b/lib/lua/src/lapi.c index 383e65d60..f83593794 100644 --- a/lib/lua/src/lapi.c +++ b/lib/lua/src/lapi.c @@ -223,7 +223,7 @@ LUA_API void lua_replace (lua_State *L, int idx) { api_checkvalidindex(L, o); if (idx == LUA_ENVIRONINDEX) { Closure *func = curr_func(L); - api_check(L, ttistable(L->top - 1)); + api_check(L, ttistable(L->top - 1)); func->c.env = hvalue(L->top - 1); luaC_barrier(L, func, L->top - 1); } @@ -783,7 +783,7 @@ LUA_API int lua_setfenv (lua_State *L, int idx) { #define checkresults(L,na,nr) \ api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na))) - + LUA_API void lua_call (lua_State *L, int nargs, int nresults) { StkId func; diff --git a/lib/lua/src/ldblib.c b/lib/lua/src/ldblib.c index 2027eda59..628a6c458 100644 --- a/lib/lua/src/ldblib.c +++ b/lib/lua/src/ldblib.c @@ -139,7 +139,7 @@ static int db_getinfo (lua_State *L) { treatstackoption(L, L1, "func"); return 1; /* return table */ } - + static int db_getlocal (lua_State *L) { int arg; diff --git a/lib/lua/src/ldebug.c b/lib/lua/src/ldebug.c index 50ad3d380..69456b964 100644 --- a/lib/lua/src/ldebug.c +++ b/lib/lua/src/ldebug.c @@ -184,7 +184,7 @@ static void collectvalidlines (lua_State *L, Closure *f) { int i; for (i=0; il.p->sizelineinfo; i++) setbvalue(luaH_setnum(L, t, lineinfo[i]), 1); - sethvalue(L, L->top, t); + sethvalue(L, L->top, t); } incr_top(L); } diff --git a/lib/lua/src/ldo.c b/lib/lua/src/ldo.c index 57d2ac7c2..7eeea636c 100644 --- a/lib/lua/src/ldo.c +++ b/lib/lua/src/ldo.c @@ -370,7 +370,7 @@ int luaD_poscall (lua_State *L, StkId firstResult) { ** The arguments are on the stack, right after the function. ** When returns, all the results are on the stack, starting at the original ** function position. -*/ +*/ void luaD_call (lua_State *L, StkId func, int nResults) { if (++L->nCcalls >= LUAI_MAXCCALLS) { if (L->nCcalls == LUAI_MAXCCALLS) diff --git a/lib/lua/src/lgc.c b/lib/lua/src/lgc.c index 9141a1c60..9c96991a9 100644 --- a/lib/lua/src/lgc.c +++ b/lib/lua/src/lgc.c @@ -315,7 +315,7 @@ static l_mem propagatemark (global_State *g) { traverseproto(g, p); return sizeof(Proto) + sizeof(Instruction) * p->sizecode + sizeof(Proto *) * p->sizep + - sizeof(TValue) * p->sizek + + sizeof(TValue) * p->sizek + sizeof(int) * p->sizelineinfo + sizeof(LocVar) * p->sizelocvars + sizeof(TString *) * p->sizeupvalues; @@ -701,7 +701,7 @@ void luaC_linkupval (lua_State *L, UpVal *uv) { GCObject *o = obj2gco(uv); o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */ g->rootgc = o; - if (isgray(o)) { + if (isgray(o)) { if (g->gcstate == GCSpropagate) { gray2black(o); /* closed upvalues need barrier */ luaC_barrier(L, uv, uv->v); diff --git a/lib/lua/src/llimits.h b/lib/lua/src/llimits.h index ca8dcb722..20475d41f 100644 --- a/lib/lua/src/llimits.h +++ b/lib/lua/src/llimits.h @@ -107,7 +107,7 @@ typedef lu_int32 Instruction; #ifndef lua_lock -#define lua_lock(L) ((void) 0) +#define lua_lock(L) ((void) 0) #define lua_unlock(L) ((void) 0) #endif @@ -118,7 +118,7 @@ typedef lu_int32 Instruction; /* ** macro to control inclusion of some hard tests on stack reallocation -*/ +*/ #ifndef HARDSTACKTESTS #define condhardstacktests(x) ((void)0) #else diff --git a/lib/lua/src/loadlib.c b/lib/lua/src/loadlib.c index 6158c5353..2f73f553c 100644 --- a/lib/lua/src/loadlib.c +++ b/lib/lua/src/loadlib.c @@ -502,7 +502,7 @@ static int ll_require (lua_State *L) { ** 'module' function ** ======================================================= */ - + static void setfenv (lua_State *L) { lua_Debug ar; @@ -632,7 +632,7 @@ LUALIB_API int luaopen_package (lua_State *L) { lua_setfield(L, -2, "__gc"); /* create `package' table */ luaL_register(L, LUA_LOADLIBNAME, pk_funcs); -#if defined(LUA_COMPAT_LOADLIB) +#if defined(LUA_COMPAT_LOADLIB) lua_getfield(L, -1, "loadlib"); lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); #endif diff --git a/lib/lua/src/lobject.h b/lib/lua/src/lobject.h index f1e447ef3..577c6cc10 100644 --- a/lib/lua/src/lobject.h +++ b/lib/lua/src/lobject.h @@ -337,7 +337,7 @@ typedef struct Node { typedef struct Table { CommonHeader; - lu_byte flags; /* 1<

C) then pc++ */ -OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ +OP_TEST,/* A C if not (R(A) <=> C) then pc++ */ +OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */ OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ @@ -197,8 +197,8 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2); if R(A) =) R(A)*/ @@ -240,7 +240,7 @@ OP_VARARG/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */ ** bits 4-5: B arg mode ** bit 6: instruction set register A ** bit 7: operator is a test -*/ +*/ enum OpArgMask { OpArgN, /* argument is not used */ diff --git a/lib/lua/src/lstate.c b/lib/lua/src/lstate.c index eced4a585..91b7a1770 100644 --- a/lib/lua/src/lstate.c +++ b/lib/lua/src/lstate.c @@ -36,7 +36,7 @@ typedef struct LG { lua_State l; global_State g; } LG; - + static void stack_init (lua_State *L1, lua_State *L) { diff --git a/lib/lua/src/lstrlib.c b/lib/lua/src/lstrlib.c index 7a03489be..add3b1c2b 100644 --- a/lib/lua/src/lstrlib.c +++ b/lib/lua/src/lstrlib.c @@ -636,7 +636,7 @@ static void add_value (MatchState *ms, luaL_Buffer *b, const char *s, lua_pushlstring(L, s, e - s); /* keep original text */ } else if (!lua_isstring(L, -1)) - luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); + luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); luaL_addvalue(b); /* add result to accumulator */ } diff --git a/lib/lua/src/ltable.c b/lib/lua/src/ltable.c index ec84f4fab..677b0e95c 100644 --- a/lib/lua/src/ltable.c +++ b/lib/lua/src/ltable.c @@ -48,7 +48,7 @@ #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) - + #define hashstr(t,str) hashpow2(t, (str)->tsv.hash) #define hashboolean(t,p) hashpow2(t, p) @@ -302,7 +302,7 @@ static void resize (lua_State *L, Table *t, int nasize, int nhsize) { if (nasize > oldasize) /* array part must grow? */ setarrayvector(L, t, nasize); /* create new hash part with appropriate size */ - setnodevector(L, t, nhsize); + setnodevector(L, t, nhsize); if (nasize < oldasize) { /* array part must shrink? */ t->sizearray = nasize; /* re-insert elements from vanishing slice */ @@ -390,11 +390,11 @@ static Node *getfreepos (Table *t) { /* -** inserts a new key into a hash table; first, check whether key's main -** position is free. If not, check whether colliding node is in its main -** position or not: if it is not, move colliding node to an empty place and -** put new key in its main position; otherwise (colliding node is in its main -** position), new key goes to an empty position. +** inserts a new key into a hash table; first, check whether key's main +** position is free. If not, check whether colliding node is in its main +** position or not: if it is not, move colliding node to an empty place and +** put new key in its main position; otherwise (colliding node is in its main +** position), new key goes to an empty position. */ static TValue *newkey (lua_State *L, Table *t, const TValue *key) { Node *mp = mainposition(t, key); diff --git a/lib/lua/src/lua.c b/lib/lua/src/lua.c index 3a4660932..8ef87873b 100644 --- a/lib/lua/src/lua.c +++ b/lib/lua/src/lua.c @@ -242,14 +242,14 @@ static int handle_script (lua_State *L, char **argv, int n) { int narg = getargs(L, argv, n); /* collect arguments */ lua_setglobal(L, "arg"); fname = argv[n]; - if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) + if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) fname = NULL; /* stdin */ status = luaL_loadfile(L, fname); lua_insert(L, -(narg+1)); if (status == 0) status = docall(L, narg, 0); else - lua_pop(L, narg); + lua_pop(L, narg); return report(L, status); } diff --git a/lib/lua/src/lua.h b/lib/lua/src/lua.h index 1d7fe927f..95f584c68 100644 --- a/lib/lua/src/lua.h +++ b/lib/lua/src/lua.h @@ -250,7 +250,7 @@ LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); -/* +/* ** =============================================================== ** some useful macros ** =============================================================== diff --git a/lib/lua/src/lualib.h b/lib/lua/src/lualib.h index 469417f67..e9ff9ba97 100644 --- a/lib/lua/src/lualib.h +++ b/lib/lua/src/lualib.h @@ -41,7 +41,7 @@ LUALIB_API int (luaopen_package) (lua_State *L); /* open all previous libraries */ -LUALIB_API void (luaL_openlibs) (lua_State *L); +LUALIB_API void (luaL_openlibs) (lua_State *L); diff --git a/lib/lua/src/lvm.c b/lib/lua/src/lvm.c index e0a0cd852..a438d7805 100644 --- a/lib/lua/src/lvm.c +++ b/lib/lua/src/lvm.c @@ -125,7 +125,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) { callTMres(L, val, tm, t, key); return; } - t = tm; /* else repeat with `tm' */ + t = tm; /* else repeat with `tm' */ } luaG_runerror(L, "loop in gettable"); } diff --git a/mods/mods_here.txt b/mods/mods_here.txt index e14b7539e..650e12db3 100644 --- a/mods/mods_here.txt +++ b/mods/mods_here.txt @@ -7,4 +7,4 @@ To enable them, go to the configure world window in the main menu or write load_mod_ = true -in world.mt in the world directory. +in world.mt in the world directory. diff --git a/src/client/hud.cpp b/src/client/hud.cpp index 42b8a2e09..b18bd5382 100644 --- a/src/client/hud.cpp +++ b/src/client/hud.cpp @@ -411,7 +411,7 @@ void Hud::drawLuaElements(const v3s16 &camera_offset) case HUD_ELEM_WAYPOINT: { if (!calculateScreenPos(camera_offset, e, &pos)) break; - + pos += v2s32(e->offset.X, e->offset.Y); video::SColor color(255, (e->number >> 16) & 0xFF, (e->number >> 8) & 0xFF, diff --git a/src/client/mesh_generator_thread.cpp b/src/client/mesh_generator_thread.cpp index 95ae25074..60605d3b7 100644 --- a/src/client/mesh_generator_thread.cpp +++ b/src/client/mesh_generator_thread.cpp @@ -229,7 +229,7 @@ void MeshUpdateWorkerThread::doUpdate() MapBlockMesh *mesh_new = new MapBlockMesh(q->data, *m_camera_offset); - + MeshUpdateResult r; r.p = q->p; @@ -257,7 +257,7 @@ MeshUpdateManager::MeshUpdateManager(Client *client): // Automatically use 33% of the system cores for mesh generation, max 4 if (number_of_threads == 0) number_of_threads = MYMIN(4, Thread::getNumberOfProcessors() / 3); - + // use at least one thread number_of_threads = MYMAX(1, number_of_threads); infostream << "MeshUpdateManager: using " << number_of_threads << " threads" << std::endl; diff --git a/src/client/render/anaglyph.cpp b/src/client/render/anaglyph.cpp index b26db9186..ffd528216 100644 --- a/src/client/render/anaglyph.cpp +++ b/src/client/render/anaglyph.cpp @@ -85,7 +85,7 @@ void populateAnaglyphPipeline(RenderPipeline *pipeline, Client *client) // reset pipeline->addStep(0.0f); pipeline->addStep(video::ECP_ALL); - + pipeline->addStep(); pipeline->addStep(); pipeline->addStep(); diff --git a/src/client/render/anaglyph.h b/src/client/render/anaglyph.h index 7a186aeff..f817e2c46 100644 --- a/src/client/render/anaglyph.h +++ b/src/client/render/anaglyph.h @@ -37,7 +37,7 @@ private: /** * Resets depth buffer of the current render target - * + * */ class ClearDepthBufferTarget : public RenderTarget { @@ -53,7 +53,7 @@ private: /** * Enables or disables override material when activated - * + * */ class ConfigureOverrideMaterialTarget : public RenderTarget { diff --git a/src/client/render/core.cpp b/src/client/render/core.cpp index 5e87f58fc..37a5106df 100644 --- a/src/client/render/core.cpp +++ b/src/client/render/core.cpp @@ -23,9 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "client/shadows/dynamicshadowsrender.h" #include "settings.h" -RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud, +RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud, ShadowRenderer *_shadow_renderer, RenderPipeline *_pipeline, v2f _virtual_size_scale) - : device(_device), client(_client), hud(_hud), shadow_renderer(_shadow_renderer), + : device(_device), client(_client), hud(_hud), shadow_renderer(_shadow_renderer), pipeline(_pipeline), virtual_size_scale(_virtual_size_scale) { } diff --git a/src/client/render/core.h b/src/client/render/core.h index a3011de13..2d9e41047 100644 --- a/src/client/render/core.h +++ b/src/client/render/core.h @@ -43,7 +43,7 @@ protected: v2u32 virtual_size { 0, 0 }; public: - RenderingCore(IrrlichtDevice *device, Client *client, Hud *hud, + RenderingCore(IrrlichtDevice *device, Client *client, Hud *hud, ShadowRenderer *shadow_renderer, RenderPipeline *pipeline, v2f virtual_size_scale); RenderingCore(const RenderingCore &) = delete; diff --git a/src/client/render/factory.cpp b/src/client/render/factory.cpp index 4992e6192..2e9d5eb5f 100644 --- a/src/client/render/factory.cpp +++ b/src/client/render/factory.cpp @@ -41,7 +41,7 @@ RenderingCore *createRenderingCore(const std::string &stereo_mode, IrrlichtDevic { CreatePipelineResult created_pipeline; createPipeline(stereo_mode, device, client, hud, created_pipeline); - return new RenderingCore(device, client, hud, + return new RenderingCore(device, client, hud, created_pipeline.shadow_renderer, created_pipeline.pipeline, created_pipeline.virtual_size_scale); } diff --git a/src/client/render/interlaced.cpp b/src/client/render/interlaced.cpp index 20e918487..594871526 100644 --- a/src/client/render/interlaced.cpp +++ b/src/client/render/interlaced.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "client/shader.h" #include "client/camera.h" -InitInterlacedMaskStep::InitInterlacedMaskStep(TextureBuffer *_buffer, u8 _index) : +InitInterlacedMaskStep::InitInterlacedMaskStep(TextureBuffer *_buffer, u8 _index) : buffer(_buffer), index(_index) { } diff --git a/src/client/render/plain.h b/src/client/render/plain.h index 6bea36bf3..7062cd0e6 100644 --- a/src/client/render/plain.h +++ b/src/client/render/plain.h @@ -80,7 +80,7 @@ public: }; /** - * UpscaleStep step performs rescaling of the image + * UpscaleStep step performs rescaling of the image * in the source texture 0 to the size of the target. */ class UpscaleStep : public RenderStep diff --git a/src/client/render/secondstage.h b/src/client/render/secondstage.h index 37d5b5071..9e3640927 100644 --- a/src/client/render/secondstage.h +++ b/src/client/render/secondstage.h @@ -30,7 +30,7 @@ class PostProcessingStep : public RenderStep public: /** * Construct a new PostProcessingStep object - * + * * @param shader_id ID of the shader in IShaderSource * @param texture_map Map of textures to be chosen from the render source */ @@ -44,7 +44,7 @@ public: /** * Configure bilinear filtering for a specific texture layer - * + * * @param index Index of the texture layer * @param value true to enable the bilinear filter, false to disable */ diff --git a/src/client/render/sidebyside.cpp b/src/client/render/sidebyside.cpp index b02ac3b07..14a723385 100644 --- a/src/client/render/sidebyside.cpp +++ b/src/client/render/sidebyside.cpp @@ -39,7 +39,7 @@ void DrawImageStep::run(PipelineContext &context) { if (target) target->activate(context); - + auto texture = source->getTexture(texture_index); core::dimension2du output_size = context.device->getVideoDriver()->getScreenSize(); v2s32 pos(offset.X * output_size.Width, offset.Y * output_size.Height); diff --git a/src/client/shadows/dynamicshadows.cpp b/src/client/shadows/dynamicshadows.cpp index 80db64286..f717cc8b0 100644 --- a/src/client/shadows/dynamicshadows.cpp +++ b/src/client/shadows/dynamicshadows.cpp @@ -99,7 +99,7 @@ void DirectionalLight::createSplitMatrices(const Camera *cam) future_frustum.length = length; future_frustum.radius = radius; future_frustum.ViewMat.buildCameraLookAtMatrixLH(eye, center_scene, v3f(0.0f, 1.0f, 0.0f)); - future_frustum.ProjOrthMat.buildProjectionMatrixOrthoLH(radius, radius, + future_frustum.ProjOrthMat.buildProjectionMatrixOrthoLH(radius, radius, 0.0f, length, false); future_frustum.camera_offset = cam->getOffset(); } diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 8421465c4..189fa8caa 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -1028,7 +1028,7 @@ video::IImage* TextureSource::generateImage(const std::string &name, std::set dim = tmp->getDimension(); blit_with_alpha(tmp, baseimg, v2s32(0, 0), v2s32(0, 0), dim); diff --git a/src/nodedef.h b/src/nodedef.h index 288d09dd8..53f934ec0 100644 --- a/src/nodedef.h +++ b/src/nodedef.h @@ -299,7 +299,7 @@ struct TileDef struct ContentFeatures { - // PROTOCOL_VERSION >= 37. This is legacy and should not be increased anymore, + // PROTOCOL_VERSION >= 37. This is legacy and should not be increased anymore, // write checks that depend directly on the protocol version instead. static const u8 CONTENTFEATURES_VERSION = 13; diff --git a/src/script/lua_api/l_object.h b/src/script/lua_api/l_object.h index 06d1cd90e..35e38151b 100644 --- a/src/script/lua_api/l_object.h +++ b/src/script/lua_api/l_object.h @@ -378,7 +378,7 @@ private: // set_lighting(self, lighting) static int l_set_lighting(lua_State *L); - + // get_lighting(self) static int l_get_lighting(lua_State *L); diff --git a/src/texture_override.cpp b/src/texture_override.cpp index 81c986ccf..88f754f88 100644 --- a/src/texture_override.cpp +++ b/src/texture_override.cpp @@ -102,7 +102,7 @@ TextureOverrideSource::TextureOverrideSource(std::string filepath) << " Syntax error in texture override \"" << line << "\": Unknown target \"" << target << "\"" << std::endl; - + } // If there are no valid targets, skip adding this override diff --git a/src/unittest/test_serialization.cpp b/src/unittest/test_serialization.cpp index ff6b57507..037162611 100644 --- a/src/unittest/test_serialization.cpp +++ b/src/unittest/test_serialization.cpp @@ -170,7 +170,7 @@ void TestSerialization::testDeSerializeLongString() void TestSerialization::testSerializeJsonString() { std::istringstream is(std::ios::binary); - const auto reset_is = [&] (const std::string &s) { + const auto reset_is = [&] (const std::string &s) { is.clear(); is.str(s); }; diff --git a/src/util/numeric.h b/src/util/numeric.h index 1aeed9ce2..4863f805b 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -174,7 +174,7 @@ struct MeshGrid { { return v3s16(getMeshPos(p.X), getMeshPos(p.Y), getMeshPos(p.Z)); } - + /// @brief Returns true if p is an origin of a cell in the grid. bool isMeshPos(v3s16 &p) const { diff --git a/util/updatepo.sh b/util/updatepo.sh index 7e9928ef4..22593a5dc 100755 --- a/util/updatepo.sh +++ b/util/updatepo.sh @@ -70,7 +70,7 @@ xgettext --package-name=minetest \ # Gettext collects a bunch of bogus comments for the "Available commands: " string # I couldn't figure out how to avoid that so get rid of them afterwards -sed '/^#\. ~.*relative_to/,/^#: /{ /^#: /!d; }' -i $potfile +sed '/^#\. ~.*relative_to/,/^#: /{ /^#: /!d; }' -i $potfile # Now iterate on all languages and create the po file if missing, or update it # if it exists already