Remove trailing whitespace (#13505)

This commit is contained in:
Thresher 2023-05-18 14:34:18 -04:00 committed by GitHub
parent 95a9f4ab7c
commit 180ec92ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 81 additions and 81 deletions

View File

@ -20,7 +20,7 @@ uniform float animationTimer;
uniform vec4 CameraPos; uniform vec4 CameraPos;
uniform float xyPerspectiveBias0; uniform float xyPerspectiveBias0;
uniform float xyPerspectiveBias1; uniform float xyPerspectiveBias1;
varying float adj_shadow_strength; varying float adj_shadow_strength;
varying float cosLight; varying float cosLight;
varying float f_normal_length; varying float f_normal_length;

View File

@ -20,7 +20,7 @@ uniform float animationTimer;
uniform vec4 CameraPos; uniform vec4 CameraPos;
uniform float xyPerspectiveBias0; uniform float xyPerspectiveBias0;
uniform float xyPerspectiveBias1; uniform float xyPerspectiveBias1;
varying float adj_shadow_strength; varying float adj_shadow_strength;
varying float cosLight; varying float cosLight;
varying float f_normal_length; varying float f_normal_length;

View File

@ -148,7 +148,7 @@ void main(void)
nNormal = normalize(vNormal); nNormal = normalize(vNormal);
cosLight = max(1e-5, dot(nNormal, -v_LightDirection)); cosLight = max(1e-5, dot(nNormal, -v_LightDirection));
float sinLight = pow(1 - pow(cosLight, 2.0), 0.5); 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; xyPerspectiveBias1 / f_textureresolution;
z_bias = 1e3 * sinLight / cosLight * (0.5 + f_textureresolution / 1024.0); z_bias = 1e3 * sinLight / cosLight * (0.5 + f_textureresolution / 1024.0);
} }

View File

@ -362,7 +362,7 @@ if map format version >= 29:
u8 name_id_mapping_version u8 name_id_mapping_version
- Should be zero for map format version 29. - Should be zero for map format version 29.
u16 num_name_id_mappings u16 num_name_id_mappings
foreach num_name_id_mappings foreach num_name_id_mappings
u16 id u16 id

View File

@ -119,7 +119,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
lighting[section.n] = state lighting[section.n] = state
for _,v in ipairs(parameters) do for _,v in ipairs(parameters) do
if fields[section.n.."."..v.n] then if fields[section.n.."."..v.n] then
local event = minetest.explode_scrollbar_event(fields[section.n.."."..v.n]) local event = minetest.explode_scrollbar_event(fields[section.n.."."..v.n])
if event.type == "CHG" then if event.type == "CHG" then

View File

@ -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 tests and demonstration applications, are licensed under the following
conditions... conditions...
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions, jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain. this software is released into the Public Domain.
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 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 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). 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 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 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 conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose. 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 The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at: described in clear, concise terms at:
http://en.wikipedia.org/wiki/MIT_License http://en.wikipedia.org/wiki/MIT_License
The full text of the MIT License follows: The full text of the MIT License follows:
======================================================================== ========================================================================

View File

@ -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 tests and demonstration applications, are licensed under the following
conditions... conditions...
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions, jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain. this software is released into the Public Domain.
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 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 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). 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 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 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 conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose. 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 The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at: described in clear, concise terms at:
http://en.wikipedia.org/wiki/MIT_License http://en.wikipedia.org/wiki/MIT_License
The full text of the MIT License follows: The full text of the MIT License follows:
======================================================================== ========================================================================

View File

@ -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 tests and demonstration applications, are licensed under the following
conditions... conditions...
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions, jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain. this software is released into the Public Domain.
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 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 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). 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 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 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 conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose. 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 The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at: described in clear, concise terms at:
http://en.wikipedia.org/wiki/MIT_License http://en.wikipedia.org/wiki/MIT_License
The full text of the MIT License follows: The full text of the MIT License follows:
======================================================================== ========================================================================

View File

@ -223,7 +223,7 @@ LUA_API void lua_replace (lua_State *L, int idx) {
api_checkvalidindex(L, o); api_checkvalidindex(L, o);
if (idx == LUA_ENVIRONINDEX) { if (idx == LUA_ENVIRONINDEX) {
Closure *func = curr_func(L); 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); func->c.env = hvalue(L->top - 1);
luaC_barrier(L, func, 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) \ #define checkresults(L,na,nr) \
api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na))) 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) { LUA_API void lua_call (lua_State *L, int nargs, int nresults) {
StkId func; StkId func;

View File

@ -139,7 +139,7 @@ static int db_getinfo (lua_State *L) {
treatstackoption(L, L1, "func"); treatstackoption(L, L1, "func");
return 1; /* return table */ return 1; /* return table */
} }
static int db_getlocal (lua_State *L) { static int db_getlocal (lua_State *L) {
int arg; int arg;

View File

@ -184,7 +184,7 @@ static void collectvalidlines (lua_State *L, Closure *f) {
int i; int i;
for (i=0; i<f->l.p->sizelineinfo; i++) for (i=0; i<f->l.p->sizelineinfo; i++)
setbvalue(luaH_setnum(L, t, lineinfo[i]), 1); setbvalue(luaH_setnum(L, t, lineinfo[i]), 1);
sethvalue(L, L->top, t); sethvalue(L, L->top, t);
} }
incr_top(L); incr_top(L);
} }

View File

@ -370,7 +370,7 @@ int luaD_poscall (lua_State *L, StkId firstResult) {
** The arguments are on the stack, right after the function. ** The arguments are on the stack, right after the function.
** When returns, all the results are on the stack, starting at the original ** When returns, all the results are on the stack, starting at the original
** function position. ** function position.
*/ */
void luaD_call (lua_State *L, StkId func, int nResults) { void luaD_call (lua_State *L, StkId func, int nResults) {
if (++L->nCcalls >= LUAI_MAXCCALLS) { if (++L->nCcalls >= LUAI_MAXCCALLS) {
if (L->nCcalls == LUAI_MAXCCALLS) if (L->nCcalls == LUAI_MAXCCALLS)

View File

@ -315,7 +315,7 @@ static l_mem propagatemark (global_State *g) {
traverseproto(g, p); traverseproto(g, p);
return sizeof(Proto) + sizeof(Instruction) * p->sizecode + return sizeof(Proto) + sizeof(Instruction) * p->sizecode +
sizeof(Proto *) * p->sizep + sizeof(Proto *) * p->sizep +
sizeof(TValue) * p->sizek + sizeof(TValue) * p->sizek +
sizeof(int) * p->sizelineinfo + sizeof(int) * p->sizelineinfo +
sizeof(LocVar) * p->sizelocvars + sizeof(LocVar) * p->sizelocvars +
sizeof(TString *) * p->sizeupvalues; sizeof(TString *) * p->sizeupvalues;
@ -701,7 +701,7 @@ void luaC_linkupval (lua_State *L, UpVal *uv) {
GCObject *o = obj2gco(uv); GCObject *o = obj2gco(uv);
o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */ o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */
g->rootgc = o; g->rootgc = o;
if (isgray(o)) { if (isgray(o)) {
if (g->gcstate == GCSpropagate) { if (g->gcstate == GCSpropagate) {
gray2black(o); /* closed upvalues need barrier */ gray2black(o); /* closed upvalues need barrier */
luaC_barrier(L, uv, uv->v); luaC_barrier(L, uv, uv->v);

View File

@ -107,7 +107,7 @@ typedef lu_int32 Instruction;
#ifndef lua_lock #ifndef lua_lock
#define lua_lock(L) ((void) 0) #define lua_lock(L) ((void) 0)
#define lua_unlock(L) ((void) 0) #define lua_unlock(L) ((void) 0)
#endif #endif
@ -118,7 +118,7 @@ typedef lu_int32 Instruction;
/* /*
** macro to control inclusion of some hard tests on stack reallocation ** macro to control inclusion of some hard tests on stack reallocation
*/ */
#ifndef HARDSTACKTESTS #ifndef HARDSTACKTESTS
#define condhardstacktests(x) ((void)0) #define condhardstacktests(x) ((void)0)
#else #else

View File

@ -502,7 +502,7 @@ static int ll_require (lua_State *L) {
** 'module' function ** 'module' function
** ======================================================= ** =======================================================
*/ */
static void setfenv (lua_State *L) { static void setfenv (lua_State *L) {
lua_Debug ar; lua_Debug ar;
@ -632,7 +632,7 @@ LUALIB_API int luaopen_package (lua_State *L) {
lua_setfield(L, -2, "__gc"); lua_setfield(L, -2, "__gc");
/* create `package' table */ /* create `package' table */
luaL_register(L, LUA_LOADLIBNAME, pk_funcs); luaL_register(L, LUA_LOADLIBNAME, pk_funcs);
#if defined(LUA_COMPAT_LOADLIB) #if defined(LUA_COMPAT_LOADLIB)
lua_getfield(L, -1, "loadlib"); lua_getfield(L, -1, "loadlib");
lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); lua_setfield(L, LUA_GLOBALSINDEX, "loadlib");
#endif #endif

View File

@ -337,7 +337,7 @@ typedef struct Node {
typedef struct Table { typedef struct Table {
CommonHeader; CommonHeader;
lu_byte flags; /* 1<<p means tagmethod(p) is not present */ lu_byte flags; /* 1<<p means tagmethod(p) is not present */
lu_byte lsizenode; /* log2 of size of `node' array */ lu_byte lsizenode; /* log2 of size of `node' array */
struct Table *metatable; struct Table *metatable;
TValue *array; /* array part */ TValue *array; /* array part */

View File

@ -186,8 +186,8 @@ OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
OP_TEST,/* A C if not (R(A) <=> C) then 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_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_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)) */ 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+1) then { pc+=sBx; R(A+3)=R(A) }*/ if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/
OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */ if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */
OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ OP_CLOSE,/* A close all variables in the stack up to (>=) 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 ** bits 4-5: B arg mode
** bit 6: instruction set register A ** bit 6: instruction set register A
** bit 7: operator is a test ** bit 7: operator is a test
*/ */
enum OpArgMask { enum OpArgMask {
OpArgN, /* argument is not used */ OpArgN, /* argument is not used */

View File

@ -36,7 +36,7 @@ typedef struct LG {
lua_State l; lua_State l;
global_State g; global_State g;
} LG; } LG;
static void stack_init (lua_State *L1, lua_State *L) { static void stack_init (lua_State *L1, lua_State *L) {

View File

@ -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 */ lua_pushlstring(L, s, e - s); /* keep original text */
} }
else if (!lua_isstring(L, -1)) 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 */ luaL_addvalue(b); /* add result to accumulator */
} }

View File

@ -48,7 +48,7 @@
#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t))))
#define hashstr(t,str) hashpow2(t, (str)->tsv.hash) #define hashstr(t,str) hashpow2(t, (str)->tsv.hash)
#define hashboolean(t,p) hashpow2(t, p) #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? */ if (nasize > oldasize) /* array part must grow? */
setarrayvector(L, t, nasize); setarrayvector(L, t, nasize);
/* create new hash part with appropriate size */ /* create new hash part with appropriate size */
setnodevector(L, t, nhsize); setnodevector(L, t, nhsize);
if (nasize < oldasize) { /* array part must shrink? */ if (nasize < oldasize) { /* array part must shrink? */
t->sizearray = nasize; t->sizearray = nasize;
/* re-insert elements from vanishing slice */ /* 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 ** 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 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 ** 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 ** put new key in its main position; otherwise (colliding node is in its main
** position), new key goes to an empty position. ** position), new key goes to an empty position.
*/ */
static TValue *newkey (lua_State *L, Table *t, const TValue *key) { static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
Node *mp = mainposition(t, key); Node *mp = mainposition(t, key);

View File

@ -242,14 +242,14 @@ static int handle_script (lua_State *L, char **argv, int n) {
int narg = getargs(L, argv, n); /* collect arguments */ int narg = getargs(L, argv, n); /* collect arguments */
lua_setglobal(L, "arg"); lua_setglobal(L, "arg");
fname = argv[n]; fname = argv[n];
if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0)
fname = NULL; /* stdin */ fname = NULL; /* stdin */
status = luaL_loadfile(L, fname); status = luaL_loadfile(L, fname);
lua_insert(L, -(narg+1)); lua_insert(L, -(narg+1));
if (status == 0) if (status == 0)
status = docall(L, narg, 0); status = docall(L, narg, 0);
else else
lua_pop(L, narg); lua_pop(L, narg);
return report(L, status); return report(L, status);
} }

View File

@ -250,7 +250,7 @@ LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
/* /*
** =============================================================== ** ===============================================================
** some useful macros ** some useful macros
** =============================================================== ** ===============================================================

View File

@ -41,7 +41,7 @@ LUALIB_API int (luaopen_package) (lua_State *L);
/* open all previous libraries */ /* open all previous libraries */
LUALIB_API void (luaL_openlibs) (lua_State *L); LUALIB_API void (luaL_openlibs) (lua_State *L);

View File

@ -125,7 +125,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) {
callTMres(L, val, tm, t, key); callTMres(L, val, tm, t, key);
return; return;
} }
t = tm; /* else repeat with `tm' */ t = tm; /* else repeat with `tm' */
} }
luaG_runerror(L, "loop in gettable"); luaG_runerror(L, "loop in gettable");
} }

View File

@ -7,4 +7,4 @@ To enable them, go to the configure world window in the main menu or write
load_mod_<modname> = true load_mod_<modname> = true
in world.mt in the world directory. in world.mt in the world directory.

View File

@ -411,7 +411,7 @@ void Hud::drawLuaElements(const v3s16 &camera_offset)
case HUD_ELEM_WAYPOINT: { case HUD_ELEM_WAYPOINT: {
if (!calculateScreenPos(camera_offset, e, &pos)) if (!calculateScreenPos(camera_offset, e, &pos))
break; break;
pos += v2s32(e->offset.X, e->offset.Y); pos += v2s32(e->offset.X, e->offset.Y);
video::SColor color(255, (e->number >> 16) & 0xFF, video::SColor color(255, (e->number >> 16) & 0xFF,
(e->number >> 8) & 0xFF, (e->number >> 8) & 0xFF,

View File

@ -229,7 +229,7 @@ void MeshUpdateWorkerThread::doUpdate()
MapBlockMesh *mesh_new = new MapBlockMesh(q->data, *m_camera_offset); MapBlockMesh *mesh_new = new MapBlockMesh(q->data, *m_camera_offset);
MeshUpdateResult r; MeshUpdateResult r;
r.p = q->p; r.p = q->p;
@ -257,7 +257,7 @@ MeshUpdateManager::MeshUpdateManager(Client *client):
// Automatically use 33% of the system cores for mesh generation, max 4 // Automatically use 33% of the system cores for mesh generation, max 4
if (number_of_threads == 0) if (number_of_threads == 0)
number_of_threads = MYMIN(4, Thread::getNumberOfProcessors() / 3); number_of_threads = MYMIN(4, Thread::getNumberOfProcessors() / 3);
// use at least one thread // use at least one thread
number_of_threads = MYMAX(1, number_of_threads); number_of_threads = MYMAX(1, number_of_threads);
infostream << "MeshUpdateManager: using " << number_of_threads << " threads" << std::endl; infostream << "MeshUpdateManager: using " << number_of_threads << " threads" << std::endl;

View File

@ -85,7 +85,7 @@ void populateAnaglyphPipeline(RenderPipeline *pipeline, Client *client)
// reset // reset
pipeline->addStep<OffsetCameraStep>(0.0f); pipeline->addStep<OffsetCameraStep>(0.0f);
pipeline->addStep<SetColorMaskStep>(video::ECP_ALL); pipeline->addStep<SetColorMaskStep>(video::ECP_ALL);
pipeline->addStep<DrawWield>(); pipeline->addStep<DrawWield>();
pipeline->addStep<MapPostFxStep>(); pipeline->addStep<MapPostFxStep>();
pipeline->addStep<DrawHUD>(); pipeline->addStep<DrawHUD>();

View File

@ -37,7 +37,7 @@ private:
/** /**
* Resets depth buffer of the current render target * Resets depth buffer of the current render target
* *
*/ */
class ClearDepthBufferTarget : public RenderTarget class ClearDepthBufferTarget : public RenderTarget
{ {
@ -53,7 +53,7 @@ private:
/** /**
* Enables or disables override material when activated * Enables or disables override material when activated
* *
*/ */
class ConfigureOverrideMaterialTarget : public RenderTarget class ConfigureOverrideMaterialTarget : public RenderTarget
{ {

View File

@ -23,9 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client/shadows/dynamicshadowsrender.h" #include "client/shadows/dynamicshadowsrender.h"
#include "settings.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) 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) pipeline(_pipeline), virtual_size_scale(_virtual_size_scale)
{ {
} }

View File

@ -43,7 +43,7 @@ protected:
v2u32 virtual_size { 0, 0 }; v2u32 virtual_size { 0, 0 };
public: public:
RenderingCore(IrrlichtDevice *device, Client *client, Hud *hud, RenderingCore(IrrlichtDevice *device, Client *client, Hud *hud,
ShadowRenderer *shadow_renderer, RenderPipeline *pipeline, ShadowRenderer *shadow_renderer, RenderPipeline *pipeline,
v2f virtual_size_scale); v2f virtual_size_scale);
RenderingCore(const RenderingCore &) = delete; RenderingCore(const RenderingCore &) = delete;

View File

@ -41,7 +41,7 @@ RenderingCore *createRenderingCore(const std::string &stereo_mode, IrrlichtDevic
{ {
CreatePipelineResult created_pipeline; CreatePipelineResult created_pipeline;
createPipeline(stereo_mode, device, client, hud, 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); created_pipeline.shadow_renderer, created_pipeline.pipeline, created_pipeline.virtual_size_scale);
} }

View File

@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client/shader.h" #include "client/shader.h"
#include "client/camera.h" #include "client/camera.h"
InitInterlacedMaskStep::InitInterlacedMaskStep(TextureBuffer *_buffer, u8 _index) : InitInterlacedMaskStep::InitInterlacedMaskStep(TextureBuffer *_buffer, u8 _index) :
buffer(_buffer), index(_index) buffer(_buffer), index(_index)
{ {
} }

View File

@ -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. * in the source texture 0 to the size of the target.
*/ */
class UpscaleStep : public RenderStep class UpscaleStep : public RenderStep

View File

@ -30,7 +30,7 @@ class PostProcessingStep : public RenderStep
public: public:
/** /**
* Construct a new PostProcessingStep object * Construct a new PostProcessingStep object
* *
* @param shader_id ID of the shader in IShaderSource * @param shader_id ID of the shader in IShaderSource
* @param texture_map Map of textures to be chosen from the render source * @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 * Configure bilinear filtering for a specific texture layer
* *
* @param index Index of the texture layer * @param index Index of the texture layer
* @param value true to enable the bilinear filter, false to disable * @param value true to enable the bilinear filter, false to disable
*/ */

View File

@ -39,7 +39,7 @@ void DrawImageStep::run(PipelineContext &context)
{ {
if (target) if (target)
target->activate(context); target->activate(context);
auto texture = source->getTexture(texture_index); auto texture = source->getTexture(texture_index);
core::dimension2du output_size = context.device->getVideoDriver()->getScreenSize(); core::dimension2du output_size = context.device->getVideoDriver()->getScreenSize();
v2s32 pos(offset.X * output_size.Width, offset.Y * output_size.Height); v2s32 pos(offset.X * output_size.Width, offset.Y * output_size.Height);

View File

@ -99,7 +99,7 @@ void DirectionalLight::createSplitMatrices(const Camera *cam)
future_frustum.length = length; future_frustum.length = length;
future_frustum.radius = radius; future_frustum.radius = radius;
future_frustum.ViewMat.buildCameraLookAtMatrixLH(eye, center_scene, v3f(0.0f, 1.0f, 0.0f)); 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); 0.0f, length, false);
future_frustum.camera_offset = cam->getOffset(); future_frustum.camera_offset = cam->getOffset();
} }

View File

@ -1028,7 +1028,7 @@ video::IImage* TextureSource::generateImage(const std::string &name, std::set<st
<< std::endl; << std::endl;
return NULL; return NULL;
} }
if (baseimg) { if (baseimg) {
core::dimension2d<u32> dim = tmp->getDimension(); core::dimension2d<u32> dim = tmp->getDimension();
blit_with_alpha(tmp, baseimg, v2s32(0, 0), v2s32(0, 0), dim); blit_with_alpha(tmp, baseimg, v2s32(0, 0), v2s32(0, 0), dim);

View File

@ -299,7 +299,7 @@ struct TileDef
struct ContentFeatures 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. // write checks that depend directly on the protocol version instead.
static const u8 CONTENTFEATURES_VERSION = 13; static const u8 CONTENTFEATURES_VERSION = 13;

View File

@ -378,7 +378,7 @@ private:
// set_lighting(self, lighting) // set_lighting(self, lighting)
static int l_set_lighting(lua_State *L); static int l_set_lighting(lua_State *L);
// get_lighting(self) // get_lighting(self)
static int l_get_lighting(lua_State *L); static int l_get_lighting(lua_State *L);

View File

@ -102,7 +102,7 @@ TextureOverrideSource::TextureOverrideSource(std::string filepath)
<< " Syntax error in texture override \"" << line << " Syntax error in texture override \"" << line
<< "\": Unknown target \"" << target << "\"" << "\": Unknown target \"" << target << "\""
<< std::endl; << std::endl;
} }
// If there are no valid targets, skip adding this override // If there are no valid targets, skip adding this override

View File

@ -170,7 +170,7 @@ void TestSerialization::testDeSerializeLongString()
void TestSerialization::testSerializeJsonString() void TestSerialization::testSerializeJsonString()
{ {
std::istringstream is(std::ios::binary); 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.clear();
is.str(s); is.str(s);
}; };

View File

@ -174,7 +174,7 @@ struct MeshGrid {
{ {
return v3s16(getMeshPos(p.X), getMeshPos(p.Y), getMeshPos(p.Z)); 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. /// @brief Returns true if p is an origin of a cell in the grid.
bool isMeshPos(v3s16 &p) const bool isMeshPos(v3s16 &p) const
{ {

View File

@ -70,7 +70,7 @@ xgettext --package-name=minetest \
# Gettext collects a bunch of bogus comments for the "Available commands: " string # 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 # I couldn't figure out how to avoid that so get rid of them afterwards
sed '/^#\. ~<number>.*relative_to/,/^#: /{ /^#: /!d; }' -i $potfile sed '/^#\. ~<number>.*relative_to/,/^#: /{ /^#: /!d; }' -i $potfile
# Now iterate on all languages and create the po file if missing, or update it # Now iterate on all languages and create the po file if missing, or update it
# if it exists already # if it exists already