Skip to content

Commit

Permalink
Style: Cleanup uses of double spaces between words
Browse files Browse the repository at this point in the history
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.
  • Loading branch information
akien-mga committed Jun 7, 2021
1 parent afbabd1 commit c1c7685
Show file tree
Hide file tree
Showing 34 changed files with 49 additions and 99 deletions.
2 changes: 1 addition & 1 deletion core/io/marshalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
// Test for potential wrong values sent by the debugger when it breaks.
Object *obj = p_variant.get_validated_object();
if (!obj) {
// Object is invalid, send a nullptr instead.
// Object is invalid, send a nullptr instead.
if (buf) {
encode_uint32(Variant::NIL, buf);
}
Expand Down
2 changes: 1 addition & 1 deletion core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &

ThreadLoadTask &load_task = thread_load_tasks[local_path];

if (load_task.resource.is_null()) { //needs to be loaded in thread
if (load_task.resource.is_null()) { //needs to be loaded in thread

load_task.semaphore = memnew(Semaphore);
if (thread_loading_count < thread_load_max) {
Expand Down
1 change: 0 additions & 1 deletion core/io/xml_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class XMLParser : public Reference {

Vector<Attribute> attributes;

String _replace_special_characters(const String &origstr);
bool _set_text(char *start, char *end);
void _parse_closing_xml_element();
void _ignore_definition();
Expand Down
2 changes: 1 addition & 1 deletion core/math/quick_hull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_
}
}

//fourth vertex is the one most further away from the plane
//fourth vertex is the one most further away from the plane

{
real_t maxd = 0;
Expand Down
6 changes: 3 additions & 3 deletions core/templates/hash_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class HashMap {
}

/**
* Same as get, except it can return nullptr when item was not found.
* Same as get, except it can return nullptr when item was not found.
* This is mainly used for speed purposes.
*/

Expand Down Expand Up @@ -324,7 +324,7 @@ class HashMap {
}

/**
* Same as get, except it can return nullptr when item was not found.
* Same as get, except it can return nullptr when item was not found.
* This version is custom, will take a hash and a custom key (that should support operator==()
*/

Expand Down Expand Up @@ -443,7 +443,7 @@ class HashMap {

/**
* Get the next key to p_key, and the first key if p_key is null.
* Returns a pointer to the next key if found, nullptr otherwise.
* Returns a pointer to the next key if found, nullptr otherwise.
* Adding/Removing elements while iterating will, of course, have unexpected results, don't do it.
*
* Example:
Expand Down
4 changes: 2 additions & 2 deletions core/templates/oa_hash_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class OAHashMap {
/**
* returns true if the value was found, false otherwise.
*
* if r_data is not nullptr then the value will be written to the object
* if r_data is not nullptr then the value will be written to the object
* it points to.
*/
bool lookup(const TKey &p_key, TValue &r_data) const {
Expand All @@ -249,7 +249,7 @@ class OAHashMap {
/**
* returns true if the value was found, false otherwise.
*
* if r_data is not nullptr then the value will be written to the object
* if r_data is not nullptr then the value will be written to the object
* it points to.
*/
TValue *lookup_ptr(const TKey &p_key) const {
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/Control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@
Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
Expand All @@ -1067,7 +1067,7 @@
Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
</member>
<member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/EditorDebuggerPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
</description>
</method>
<method name="register_message_capture">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/EditorImportPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
return new Godot.Collections.Array{new Godot.Collections.Dictionary{{"name", "myOption"}, {"defaultValue", false}}};
}

public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles)
public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles)
{
var file = new File();
if (file.Open(sourceFile, File.ModeFlags.Read) != Error.Ok)
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PrimitiveMesh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</methods>
<members>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/TextServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@
</argument>
<description>
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
</description>
</method>
<method name="shaped_text_get_range" qualifiers="const">
Expand Down
2 changes: 1 addition & 1 deletion drivers/unix/net_socket_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const {
FD_ZERO(&ex);
FD_SET(_sock, &ex);
struct timeval timeout = { p_timeout / 1000, (p_timeout % 1000) * 1000 };
// For blocking operation, pass nullptr timeout pointer to select.
// For blocking operation, pass nullptr timeout pointer to select.
struct timeval *tp = nullptr;
if (p_timeout >= 0) {
// If timeout is non-negative, we want to specify the timeout instead.
Expand Down
2 changes: 1 addition & 1 deletion drivers/vulkan/rendering_device_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3280,7 +3280,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF

// For each UNDEFINED, assume the prior use was a *read*, as we'd be discarding the output of a write
// Also, each UNDEFINED will do an immediate layout transition (write), s.t. we must ensure execution synchronization vs.
// the read. If this is a performance issue, one could track the actual last accessor of each resource, adding only that
// the read. If this is a performance issue, one could track the actual last accessor of each resource, adding only that
// stage
switch (is_depth_stencil ? p_initial_depth_action : p_initial_color_action) {
case INITIAL_ACTION_CLEAR_REGION:
Expand Down
49 changes: 0 additions & 49 deletions editor/node_3d_editor_gizmos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1731,59 +1731,10 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
surface_tool->set_color(bonecolor);
surface_tool->add_vertex(points[(j + 1) % 4]);
}

/*
bones[0]=parent;
surface_tool->add_bones(bones);
surface_tool->add_weights(weights);
surface_tool->add_color(Color(0.4,1,0.4,0.4));
surface_tool->add_vertex(v0);
bones[0]=i;
surface_tool->add_bones(bones);
surface_tool->add_weights(weights);
surface_tool->add_color(Color(0.4,1,0.4,0.4));
surface_tool->add_vertex(v1);
*/
} else {
grests.write[i] = skel->get_bone_rest(i);
bones.write[0] = i;
}
/*
Transform3D t = grests[i];
t.orthonormalize();

for (int i=0;i<6;i++) {


Vector3 face_points[4];

for (int j=0;j<4;j++) {
float v[3];
v[0]=1.0;
v[1]=1-2*((j>>1)&1);
v[2]=v[1]*(1-2*(j&1));

for (int k=0;k<3;k++) {
if (i<3)
face_points[j][(i+k)%3]=v[k]*(i>=3?-1:1);
else
face_points[3-j][(i+k)%3]=v[k]*(i>=3?-1:1);
}
}

for(int j=0;j<4;j++) {
surface_tool->add_bones(bones);
surface_tool->add_weights(weights);
surface_tool->add_color(Color(1.0,0.4,0.4,0.4));
surface_tool->add_vertex(t.xform(face_points[j]*0.04));
surface_tool->add_bones(bones);
surface_tool->add_weights(weights);
surface_tool->add_color(Color(1.0,0.4,0.4,0.4));
surface_tool->add_vertex(t.xform(face_points[(j+1)%4]*0.04));
}

}
*/
}

Ref<ArrayMesh> m = surface_tool->commit();
Expand Down
2 changes: 1 addition & 1 deletion misc/hooks/canonicalize_filename.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# There should be no need to change anything below this line.

# Canonicalize by recursively following every symlink in every component of the
# specified filename. This should reproduce the results of the GNU version of
# specified filename. This should reproduce the results of the GNU version of
# readlink with the -f option.
#
# Reference: http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
Expand Down
2 changes: 1 addition & 1 deletion modules/bullet/space_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ real_t SpaceBullet::get_param(PhysicsServer3D::SpaceParameter p_param) {
case PhysicsServer3D::SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO:
case PhysicsServer3D::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
default:
WARN_PRINT("The SpaceBullet doesn't support this get parameter (" + itos(p_param) + "), 0 is returned.");
WARN_PRINT("The SpaceBullet doesn't support this get parameter (" + itos(p_param) + "), 0 is returned.");
return 0.f;
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/fbx/data/fbx_mesh_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,8 +1126,8 @@ HashMap<int, R> FBXMeshData::extract_per_vertex_data(
}
const int vertex_index = get_vertex_from_polygon_vertex(p_mesh_indices, polygon_vertex_index);
ERR_FAIL_COND_V_MSG(vertex_index < 0, (HashMap<int, R>()), "FBX file corrupted: #ERR8");
ERR_FAIL_COND_V_MSG(vertex_index >= p_vertex_count, (HashMap<int, R>()), "FBX file seems corrupted: #ERR9.");
ERR_FAIL_COND_V_MSG(p_mapping_data.index[polygon_vertex_index] < 0, (HashMap<int, R>()), "FBX file seems corrupted: #ERR10.");
ERR_FAIL_COND_V_MSG(vertex_index >= p_vertex_count, (HashMap<int, R>()), "FBX file seems corrupted: #ERR9.");
ERR_FAIL_COND_V_MSG(p_mapping_data.index[polygon_vertex_index] < 0, (HashMap<int, R>()), "FBX file seems corrupted: #ERR10.");
ERR_FAIL_COND_V_MSG(p_mapping_data.index[polygon_vertex_index] >= (int)p_mapping_data.data.size(), (HashMap<int, R>()), "FBX file seems corrupted: #ERR11.");
aggregate_vertex_data[vertex_index].push_back({ polygon_id, p_mapping_data.data[p_mapping_data.index[polygon_vertex_index]] });
}
Expand Down
10 changes: 5 additions & 5 deletions modules/gdnative/include/pluginscript/godot_pluginscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ typedef struct {
//this is used by script languages that keep a reference counter of their own
//you can make make Ref<> not die when it reaches zero, so deleting the reference
//depends entirely from the script.
// Note: You can set those function pointer to nullptr if not needed.
// Note: You can set those function pointer to nullptr if not needed.
void (*refcount_incremented)(godot_pluginscript_instance_data *p_data);
bool (*refcount_decremented)(godot_pluginscript_instance_data *p_data); // return true if it can die
} godot_pluginscript_instance_desc;
Expand Down Expand Up @@ -121,12 +121,12 @@ typedef struct {
const char *name;
const char *type;
const char *extension;
const char **recognized_extensions; // nullptr terminated array
const char **recognized_extensions; // nullptr terminated array
godot_pluginscript_language_data *(*init)();
void (*finish)(godot_pluginscript_language_data *p_data);
const char **reserved_words; // nullptr terminated array
const char **comment_delimiters; // nullptr terminated array
const char **string_delimiters; // nullptr terminated array
const char **reserved_words; // nullptr terminated array
const char **comment_delimiters; // nullptr terminated array
const char **string_delimiters; // nullptr terminated array
godot_bool has_named_classes;
godot_bool supports_builtin_mode;
godot_bool can_inherit_from_file;
Expand Down
2 changes: 1 addition & 1 deletion modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public Vector2 Reflect(Vector2 normal)
#if DEBUG
if (!normal.IsNormalized())
{
throw new ArgumentException("Argument is not normalized", nameof(normal));
throw new ArgumentException("Argument is not normalized", nameof(normal));
}
#endif
return 2 * Dot(normal) * normal - this;
Expand Down
4 changes: 2 additions & 2 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public Vector3 Reflect(Vector3 normal)
#if DEBUG
if (!normal.IsNormalized())
{
throw new ArgumentException("Argument is not normalized", nameof(normal));
throw new ArgumentException("Argument is not normalized", nameof(normal));
}
#endif
return 2.0f * Dot(normal) * normal - this;
Expand All @@ -474,7 +474,7 @@ public Vector3 Rotated(Vector3 axis, real_t phi)
#if DEBUG
if (!axis.IsNormalized())
{
throw new ArgumentException("Argument is not normalized", nameof(axis));
throw new ArgumentException("Argument is not normalized", nameof(axis));
}
#endif
return new Basis(axis, phi).Xform(this);
Expand Down
8 changes: 4 additions & 4 deletions modules/theora/video_stream_theora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
}
}

/* and now we have it all. initialize decoders */
/* And now we have it all. Initialize decoders. */
if (theora_p) {
td = th_decode_alloc(&ti, ts);
px_fmt = ti.pixel_fmt;
Expand Down Expand Up @@ -484,10 +484,10 @@ void VideoStreamPlaybackTheora::update(float p_delta) {

//printf("frame time %f, play time %f, ready %i\n", (float)videobuf_time, get_time(), videobuf_ready);

/* is it already too old to be useful? This is only actually
useful cosmetically after a SIGSTOP. Note that we have to
/* is it already too old to be useful? This is only actually
useful cosmetically after a SIGSTOP. Note that we have to
decode the frame even if we don't show it (for now) due to
keyframing. Soon enough libtheora will be able to deal
keyframing. Soon enough libtheora will be able to deal
with non-keyframe seeks. */

if (videobuf_time >= get_time()) {
Expand Down
2 changes: 1 addition & 1 deletion modules/visual_script/doc_classes/VisualScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A script implemented in the Visual Script programming environment.
</brief_description>
<description>
A script implemented in the Visual Script programming environment. The script extends the functionality of all objects that instance it.
A script implemented in the Visual Script programming environment. The script extends the functionality of all objects that instance it.
[method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
You are most likely to use this class via the Visual Script editor or when writing plugins for it.
</description>
Expand Down
2 changes: 1 addition & 1 deletion platform/android/display_server_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class DisplayServerAndroid : public DisplayServer {
1004, //CURSOR_BUSY
1021, //CURSOR_DRAG
1021, //CURSOR_CAN_DRO
1000, //CURSOR_FORBIDD (no corresponding icon in Android's icon so fallback to default)
1000, //CURSOR_FORBIDD (no corresponding icon in Android's icon so fallback to default)
1015, //CURSOR_VSIZE
1014, //CURSOR_HSIZE
1017, //CURSOR_BDIAGSI
Expand Down
4 changes: 2 additions & 2 deletions platform/android/java/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

Expand Down Expand Up @@ -75,7 +75,7 @@ if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
Expand Down
2 changes: 1 addition & 1 deletion platform/android/java/lib/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string name="text_button_resume_cellular">Resume download</string>
<string name="text_button_wifi_settings">Wi-Fi settings</string>
<string name="text_verifying_download">Verifying Download</string>
<string name="text_validation_complete">XAPK File Validation Complete. Select OK to exit.</string>
<string name="text_validation_complete">XAPK File Validation Complete. Select OK to exit.</string>
<string name="text_validation_failed">XAPK File Validation Failed.</string>
<string name="text_button_pause">Pause Download</string>
<string name="text_button_resume">Resume Download</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ open internal class VkSurfaceView(context: Context) : SurfaceView(context), Surf
/**
* Tear down the rendering thread.
*
* Must not be called before a [VkRenderer] has been set.
* Must not be called before a [VkRenderer] has been set.
*/
fun onDestroy() {
vkThread.blockingExit()
Expand Down
4 changes: 2 additions & 2 deletions platform/android/plugin/godot_plugin_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

/*
The `config` section and fields are required and defined as follow:
- **name**: name of the plugin
- **binary_type**: can be either `local` or `remote`. The type affects the **binary** field
- **name**: name of the plugin.
- **binary_type**: can be either `local` or `remote`. The type affects the **binary** field.
- **binary**:
- if **binary_type** is `local`, then this should be the filename of the plugin `aar` file in the `res://android/plugins` directory (e.g: `MyPlugin.aar`).
- if **binary_type** is `remote`, then this should be a declaration for a remote gradle binary (e.g: "org.godot.example:my-plugin:0.0.0").
Expand Down
2 changes: 1 addition & 1 deletion platform/windows/context_gl_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void ContextGL_Windows::swap_buffers() {

if (vsync_via_compositor_now != vsync_via_compositor) {
// The previous frame had a different operating mode than this
// frame. Set the 'vsync_via_compositor' member variable and the
// frame. Set the 'vsync_via_compositor' member variable and the
// OpenGL swap interval to their proper values.
set_use_vsync(true);
}
Expand Down
Loading

0 comments on commit c1c7685

Please sign in to comment.