Skip to content

Commit

Permalink
Remove trailing whitespace
Browse files Browse the repository at this point in the history
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
  • Loading branch information
akien-mga committed Nov 20, 2018
1 parent 5c34228 commit 173b342
Show file tree
Hide file tree
Showing 29 changed files with 124 additions and 124 deletions.
4 changes: 2 additions & 2 deletions core/math/math_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ enum Corner {
};

/**
* The "Real" type is an abstract type used for real numbers, such as 1.5,
* The "Real" type is an abstract type used for real numbers, such as 1.5,
* in contrast to integer numbers. Precision can be controlled with the
* presence or absence of the REAL_T_IS_DOUBLE define.
* presence or absence of the REAL_T_IS_DOUBLE define.
*/
#ifdef REAL_T_IS_DOUBLE
typedef double real_t;
Expand Down
126 changes: 63 additions & 63 deletions doc/Doxyfile

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/classes/ARVRInterface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
</return>
<description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR.
If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different.
While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD.
</description>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/Animation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
[codeblock]
# This creates an animation that makes the node "Enemy" move to the right by
# 100 pixels in 1 second.
# 100 pixels in 1 second.
var animation = Animation.new()
var track_index = animation.add_track(Animation.TYPE_VALUE)
animation.track_set_path(track_index, "Enemy:position.x")
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/OrientedPathFollow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Oriented point sampler for a [Path].
</brief_description>
<description>
This node behaves like [PathFollow], except it uses its parent [Path] up vector information to enforce orientation.
This node behaves like [PathFollow], except it uses its parent [Path] up vector information to enforce orientation.
Make sure to check if the curve of this node's parent [Path] has up vectors enabled. See [PathFollow] and [Curve3D] for further information.
</description>
<tutorials>
Expand Down
4 changes: 2 additions & 2 deletions gles_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs, gles2
fd.write("\t_FORCE_INLINE_ void set_conditional(Conditionals p_conditional,bool p_enable) { _set_conditional(p_conditional,p_enable); }\n\n")
fd.write("\t#ifdef DEBUG_ENABLED\n ")
fd.write("\t#define _FU if (get_uniform(p_uniform)<0) return; if (!is_version_valid()) return; ERR_FAIL_COND( get_active()!=this ); \n\n ")
fd.write("\t#else\n ")
fd.write("\t#else\n ")
fd.write("\t#define _FU if (get_uniform(p_uniform)<0) return; \n\n ")
fd.write("\t#endif\n")
fd.write("\t#endif\n")
fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_value) { _FU glUniform1f(get_uniform(p_uniform),p_value); }\n\n")
fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, double p_value) { _FU glUniform1f(get_uniform(p_uniform),p_value); }\n\n")
fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint8_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
Expand Down
2 changes: 1 addition & 1 deletion methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def build_commandline(commands):
release_debug_targets = ['bin\\godot.windows.opt.tools.32.exe'] + ['bin\\godot.windows.opt.tools.64.exe']
targets = debug_targets + release_targets + release_debug_targets
if not env.get('MSVS'):
env['MSVS']['PROJECTSUFFIX'] = '.vcxproj'
env['MSVS']['PROJECTSUFFIX'] = '.vcxproj'
env['MSVS']['SOLUTIONSUFFIX'] = '.sln'
env.MSVSProject(
target=['#godot' + env['MSVSPROJECTSUFFIX']],
Expand Down
24 changes: 12 additions & 12 deletions modules/gdnative/gdnative_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ def generate_core_extension_struct(core):
ret_val = []
if core['next']:
ret_val += generate_core_extension_struct(core['next'])

ret_val += [
'typedef struct godot_gdnative_core_' + ('{0}_{1}'.format(core['version']['major'], core['version']['minor'])) + '_api_struct {',
'\tunsigned int type;',
'\tgodot_gdnative_api_version version;',
'\tconst godot_gdnative_api_struct *next;',
]

for funcdef in core['api']:
args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
ret_val.append('\t%s(*%s)(%s);' % (_spaced(funcdef['return_type']), funcdef['name'], args))

ret_val += ['} godot_gdnative_core_' + '{0}_{1}'.format(core['version']['major'], core['version']['minor']) + '_api_struct;', '']

return ret_val


Expand Down Expand Up @@ -171,26 +171,26 @@ def get_extension_struct_definition(name, ext, include_version=True):
ret_val += ['};\n']

return ret_val


def get_core_struct_definition(core):
ret_val = []

if core['next']:
ret_val += get_core_struct_definition(core['next'])

ret_val += [
'extern const godot_gdnative_core_' + ('{0}_{1}_api_struct api_{0}_{1}'.format(core['version']['major'], core['version']['minor'])) + ' = {',
'\tGDNATIVE_' + core['type'] + ',',
'\t{' + str(core['version']['major']) + ', ' + str(core['version']['minor']) + '},',
'\t' + ('NULL' if not core['next'] else ('(const godot_gdnative_api_struct *)& api_{0}_{1}'.format(core['version']['major'], core['version']['minor']))) + ','
]

for funcdef in core['api']:
ret_val.append('\t%s,' % funcdef['name'])

ret_val += ['};\n']

return ret_val

for ext in api['extensions']:
Expand All @@ -204,7 +204,7 @@ def get_core_struct_definition(core):
out += ['\t(godot_gdnative_api_struct *)&api_extension_' + name + '_struct,']

out += ['};\n']

if api['core']['next']:
out += get_core_struct_definition(api['core']['next'])

Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/Managed/Files/AABB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ public AABB Merge(AABB with)

return new AABB(min, max - min);
}
// Constructors

// Constructors
public AABB(Vector3 position, Vector3 size)
{
_position = position;
Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/Managed/Files/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ public string ToHtml(bool include_alpha = true)

return txt;
}
// Constructors

// Constructors
public Color(float r, float g, float b, float a = 1.0f)
{
this.r = r;
Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/Managed/Files/Mathf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public static Vector2 Polar2Cartesian(real_t r, real_t th)
public static real_t PosMod(real_t a, real_t b)
{
real_t c = a % b;
if ((c < 0 && b > 0) || (c > 0 && b < 0))
if ((c < 0 && b > 0) || (c > 0 && b < 0))
{
c += b;
}
Expand All @@ -219,7 +219,7 @@ public static real_t PosMod(real_t a, real_t b)
public static int PosMod(int a, int b)
{
int c = a % b;
if ((c < 0 && b > 0) || (c > 0 && b < 0))
if ((c < 0 && b > 0) || (c > 0 && b < 0))
{
c += b;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mono/glue/Managed/Files/MathfEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static int CeilToInt(real_t s)
public static int FloorToInt(real_t s)
{
return (int)Math.Floor(s);
}
}

public static int RoundToInt(real_t s)
{
Expand Down
6 changes: 3 additions & 3 deletions modules/mono/glue/Managed/Files/Plane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public Vector3 Project(Vector3 point)
{
return point - _normal * DistanceTo(point);
}

// Constants
private static readonly Plane _planeYZ = new Plane(1, 0, 0, 0);
private static readonly Plane _planeXZ = new Plane(0, 1, 0, 0);
Expand All @@ -153,8 +153,8 @@ public Vector3 Project(Vector3 point)
public static Plane PlaneYZ { get { return _planeYZ; } }
public static Plane PlaneXZ { get { return _planeXZ; } }
public static Plane PlaneXY { get { return _planeXY; } }
// Constructors

// Constructors
public Plane(real_t a, real_t b, real_t c, real_t d)
{
_normal = new Vector3(a, b, c);
Expand Down
2 changes: 1 addition & 1 deletion modules/mono/glue/Managed/Files/Quat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public Vector3 Xform(Vector3 v)
// Static Readonly Properties
public static Quat Identity { get; } = new Quat(0f, 0f, 0f, 1f);

// Constructors
// Constructors
public Quat(real_t x, real_t y, real_t z, real_t w)
{
this.x = x;
Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/Managed/Files/Rect2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ public Rect2 Merge(Rect2 b)

return newRect;
}
// Constructors

// Constructors
public Rect2(Vector2 position, Vector2 size)
{
_position = position;
Expand Down
8 changes: 4 additions & 4 deletions modules/mono/glue/Managed/Files/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static int CompareTo(this string instance, string to, bool caseSensitive

int instanceIndex = 0;
int toIndex = 0;

if (caseSensitive) // Outside while loop to avoid checking multiple times, despite some code duplication.
{
while (true)
Expand Down Expand Up @@ -480,9 +480,9 @@ public static bool IsValidIdentifier(this string instance)
return false; // Don't start with number plz
}

bool validChar = instance[i] >= '0' &&
instance[i] <= '9' || instance[i] >= 'a' &&
instance[i] <= 'z' || instance[i] >= 'A' &&
bool validChar = instance[i] >= '0' &&
instance[i] <= '9' || instance[i] >= 'a' &&
instance[i] <= 'z' || instance[i] >= 'A' &&
instance[i] <= 'Z' || instance[i] == '_';

if (!validChar)
Expand Down
2 changes: 1 addition & 1 deletion modules/mono/glue/Managed/Files/Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public Vector3 XformInv(Vector3 v)
public static Transform FlipY { get { return _flipY; } }
public static Transform FlipZ { get { return _flipZ; } }

// Constructors
// Constructors
public Transform(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 origin)
{
basis = Basis.CreateFromAxes(xAxis, yAxis, zAxis);
Expand Down
6 changes: 3 additions & 3 deletions modules/mono/glue/Managed/Files/Transform2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,15 @@ public Vector2 XformInv(Vector2 v)
public static Transform2D Identity { get { return _identity; } }
public static Transform2D FlipX { get { return _flipX; } }
public static Transform2D FlipY { get { return _flipY; } }
// Constructors

// Constructors
public Transform2D(Vector2 xAxis, Vector2 yAxis, Vector2 origin)
{
x = xAxis;
y = yAxis;
o = origin;
}

public Transform2D(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy)
{
x = new Vector2(xx, xy);
Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/Managed/Files/Vector2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void Set(Vector2 v)
x = v.x;
y = v.y;
}

public Vector2 Slerp(Vector2 b, real_t t)
{
real_t theta = AngleTo(b);
Expand All @@ -242,7 +242,7 @@ public Vector2 Tangent()
private static readonly Vector2 _one = new Vector2(1, 1);
private static readonly Vector2 _negOne = new Vector2(-1, -1);
private static readonly Vector2 _inf = new Vector2(Mathf.Inf, Mathf.Inf);

private static readonly Vector2 _up = new Vector2(0, -1);
private static readonly Vector2 _down = new Vector2(0, 1);
private static readonly Vector2 _right = new Vector2(1, 0);
Expand Down
6 changes: 3 additions & 3 deletions modules/mono/glue/Managed/Files/Vector3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ public Basis ToDiagonalMatrix()
0f, 0f, z
);
}

// Constants
private static readonly Vector3 _zero = new Vector3(0, 0, 0);
private static readonly Vector3 _one = new Vector3(1, 1, 1);
private static readonly Vector3 _negOne = new Vector3(-1, -1, -1);
private static readonly Vector3 _inf = new Vector3(Mathf.Inf, Mathf.Inf, Mathf.Inf);

private static readonly Vector3 _up = new Vector3(0, 1, 0);
private static readonly Vector3 _down = new Vector3(0, -1, 0);
private static readonly Vector3 _right = new Vector3(1, 0, 0);
Expand All @@ -294,7 +294,7 @@ public Basis ToDiagonalMatrix()
public static Vector3 One { get { return _one; } }
public static Vector3 NegOne { get { return _negOne; } }
public static Vector3 Inf { get { return _inf; } }

public static Vector3 Up { get { return _up; } }
public static Vector3 Down { get { return _down; } }
public static Vector3 Right { get { return _right; } }
Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/Managed/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;

// Information about this assembly is defined by the following attributes.
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.

[assembly: AssemblyTitle("Managed")]
Expand All @@ -19,7 +19,7 @@

[assembly: AssemblyVersion("1.0.*")]

// The following attributes are used to specify the signing key for the assembly,
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.

//[assembly: AssemblyDelaySign(false)]
Expand Down
6 changes: 3 additions & 3 deletions platform/android/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def mySpawn(sh, escape, cmd, args, env):
else:
print("Using NDK deprecated headers")
env.Append(CPPFLAGS=["-isystem", lib_sysroot + "/usr/include"])

env.Append(CPPFLAGS='-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'.split())
env.Append(CPPFLAGS='-DNO_STATVFS -DGLES_ENABLED'.split())

Expand Down Expand Up @@ -267,12 +267,12 @@ def mySpawn(sh, escape, cmd, args, env):
env.Append(LINKFLAGS=['-shared', '--sysroot=' + lib_sysroot, '-Wl,--warn-shared-textrel'])
if mt_link:
env.Append(LINKFLAGS=['-Wl,--threads'])

if env["android_arch"] == "armv7":
env.Append(LINKFLAGS='-Wl,--fix-cortex-a8'.split())
env.Append(LINKFLAGS='-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'.split())
env.Append(LINKFLAGS='-Wl,-soname,libgodot_android.so -Wl,--gc-sections'.split())

env.Append(LINKFLAGS=target_opts)
env.Append(LINKFLAGS=common_opts)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
android:id="@+id/appIcon"
android:layout_width="fill_parent"
android:layout_height="25dp"
android:scaleType="centerInside"
android:scaleType="centerInside"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentTop="true"
android:src="@android:drawable/stat_sys_download" />

<TextView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.apache.http.conn.ssl.SSLSocketFactory;

/**
*
*
* @author Luis Linietsky <luis.linietsky@gmail.com>
*/
public class CustomSSLSocketFactory extends SSLSocketFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
import android.util.Log;

/**
*
*
* @author Luis Linietsky <luis.linietsky@gmail.com>
*/
public class HttpRequester {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.apache.http.message.BasicNameValuePair;

/**
*
*
* @author Luis Linietsky <luis.linietsky@gmail.com>
*/
public class RequestParams {
Expand Down
Loading

0 comments on commit 173b342

Please sign in to comment.