summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/bmp/image_loader_bmp.cpp4
-rw-r--r--modules/bullet/space_bullet.cpp6
-rw-r--r--modules/gdnative/include/videodecoder/godot_videodecoder.h2
-rw-r--r--modules/gdscript/gdscript_function.cpp2
-rw-r--r--modules/glslang/register_types.cpp18
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp4
-rw-r--r--modules/jpg/image_loader_jpegd.cpp2
-rw-r--r--modules/mono/csharp_script.cpp2
-rw-r--r--modules/mono/editor/godotsharp_export.cpp2
-rw-r--r--modules/pvr/texture_loader_pvr.cpp4
-rw-r--r--modules/tga/image_loader_tga.cpp2
-rw-r--r--modules/theora/video_stream_theora.cpp2
-rw-r--r--modules/theora/video_stream_theora.h2
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp6
-rw-r--r--modules/webp/image_loader_webp.cpp2
-rw-r--r--modules/websocket/editor_debugger_server_websocket.cpp2
-rw-r--r--modules/websocket/remote_debugger_peer_websocket.cpp4
17 files changed, 33 insertions, 33 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index ea2b2b548f..f69f3a43a4 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -153,7 +153,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
if (p_color_buffer == nullptr || color_table_size == 0) { // regular pixels
- p_image->create(width, height, 0, Image::FORMAT_RGBA8, data);
+ p_image->create(width, height, false, Image::FORMAT_RGBA8, data);
} else { // data is in indexed format, extend it
@@ -193,7 +193,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
dest += 4;
}
- p_image->create(width, height, 0, Image::FORMAT_RGBA8, extended_data);
+ p_image->create(width, height, false, Image::FORMAT_RGBA8, extended_data);
}
}
return err;
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index cc6ecbed07..aff203d7b4 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -205,7 +205,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
/// Returns the list of contacts pairs in this order: Local contact, other body contact
bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
if (p_result_max <= 0)
- return 0;
+ return false;
ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
@@ -213,7 +213,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &
if (!btShape->isConvex()) {
bulletdelete(btShape);
ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
- return 0;
+ return false;
}
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
@@ -245,7 +245,7 @@ bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_sh
if (!btShape->isConvex()) {
bulletdelete(btShape);
ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
- return 0;
+ return false;
}
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
diff --git a/modules/gdnative/include/videodecoder/godot_videodecoder.h b/modules/gdnative/include/videodecoder/godot_videodecoder.h
index 3e91a2e9ac..16c92abd22 100644
--- a/modules/gdnative/include/videodecoder/godot_videodecoder.h
+++ b/modules/gdnative/include/videodecoder/godot_videodecoder.h
@@ -46,7 +46,7 @@ typedef struct
void *next;
void *(*constructor)(godot_object *);
void (*destructor)(void *);
- const char *(*get_plugin_name)(void);
+ const char *(*get_plugin_name)();
const char **(*get_supported_extensions)(int *count);
godot_bool (*open_file)(void *, void *); // data struct, and a FileAccess pointer
godot_real (*get_length)(const void *);
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index df0fac956c..4e31ffe2a4 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -1289,7 +1289,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
gdfs->state.instance = p_instance;
p_instance->pending_func_states.add(&gdfs->instances_list);
} else {
- gdfs->state.instance = NULL;
+ gdfs->state.instance = nullptr;
}
}
#ifdef DEBUG_ENABLED
diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp
index 2540ba476c..5203460830 100644
--- a/modules/glslang/register_types.cpp
+++ b/modules/glslang/register_types.cpp
@@ -130,15 +130,15 @@ static const TBuiltInResource default_builtin_resource = {
/*maxTaskWorkGroupSizeZ_NV*/ 0,
/*maxMeshViewCountNV*/ 0,
/*limits*/ {
- /*nonInductiveForLoops*/ 1,
- /*whileLoops*/ 1,
- /*doWhileLoops*/ 1,
- /*generalUniformIndexing*/ 1,
- /*generalAttributeMatrixVectorIndexing*/ 1,
- /*generalVaryingIndexing*/ 1,
- /*generalSamplerIndexing*/ 1,
- /*generalVariableIndexing*/ 1,
- /*generalConstantMatrixVectorIndexing*/ 1,
+ /*nonInductiveForLoops*/ true,
+ /*whileLoops*/ true,
+ /*doWhileLoops*/ true,
+ /*generalUniformIndexing*/ true,
+ /*generalAttributeMatrixVectorIndexing*/ true,
+ /*generalVaryingIndexing*/ true,
+ /*generalSamplerIndexing*/ true,
+ /*generalVariableIndexing*/ true,
+ /*generalConstantMatrixVectorIndexing*/ true,
}
};
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 9abbac6a0b..fc545430f5 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -1405,8 +1405,8 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
Vector3 points[4];
for (int j = 0; j < 4; j++) {
- static const bool orderx[4] = { 0, 1, 1, 0 };
- static const bool ordery[4] = { 0, 0, 1, 1 };
+ static const bool orderx[4] = { false, true, true, false };
+ static const bool ordery[4] = { false, false, true, true };
Vector3 sp;
if (orderx[j]) {
diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp
index 9e87d11ac1..1a2afeb5b9 100644
--- a/modules/jpg/image_loader_jpegd.cpp
+++ b/modules/jpg/image_loader_jpegd.cpp
@@ -96,7 +96,7 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
else
fmt = Image::FORMAT_RGB8;
- p_image->create(image_width, image_height, 0, fmt, data);
+ p_image->create(image_width, image_height, false, fmt, data);
return OK;
}
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 7d00d2d314..43c86d3e28 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -295,7 +295,7 @@ void CSharpLanguage::get_reserved_words(List<String> *p_words) const {
"when",
"where",
"yield",
- 0
+ nullptr
};
const char **w = _reserved_words;
diff --git a/modules/mono/editor/godotsharp_export.cpp b/modules/mono/editor/godotsharp_export.cpp
index d6a271f1d9..1cdb08d50e 100644
--- a/modules/mono/editor/godotsharp_export.cpp
+++ b/modules/mono/editor/godotsharp_export.cpp
@@ -78,7 +78,7 @@ Error get_assembly_dependencies(GDMonoAssembly *p_assembly, const Vector<String>
if (r_assembly_dependencies.has(ref_name))
continue;
- GDMonoAssembly *ref_assembly = NULL;
+ GDMonoAssembly *ref_assembly = nullptr;
{
MonoAssemblyName *ref_aname = mono_assembly_name_new("A"); // We can't allocate an empty MonoAssemblyName, hence "A"
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index d28199420d..d498c6d858 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -261,9 +261,9 @@ struct PVRTCBlock {
_FORCE_INLINE_ bool is_po2(uint32_t p_input) {
if (p_input == 0)
- return 0;
+ return false;
uint32_t minus1 = p_input - 1;
- return ((p_input | minus1) == (p_input ^ minus1)) ? 1 : 0;
+ return ((p_input | minus1) == (p_input ^ minus1)) ? true : false;
}
static void unpack_5554(const PVRTCBlock *p_block, int p_ab_colors[2][4]) {
diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp
index fc9d727bb0..eb9f23d894 100644
--- a/modules/tga/image_loader_tga.cpp
+++ b/modules/tga/image_loader_tga.cpp
@@ -199,7 +199,7 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
}
}
- p_image->create(width, height, 0, Image::FORMAT_RGBA8, image_data);
+ p_image->create(width, height, false, Image::FORMAT_RGBA8, image_data);
return OK;
}
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index f5a7b5fc06..3163b60bb8 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -80,7 +80,7 @@ int VideoStreamPlaybackTheora::queue_page(ogg_page *page) {
return 0;
}
-void VideoStreamPlaybackTheora::video_write(void) {
+void VideoStreamPlaybackTheora::video_write() {
th_ycbcr_buffer yuv;
th_decode_ycbcr_out(td, yuv);
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index f98368ed8b..d5a2640794 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -63,7 +63,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
int buffer_data();
int queue_page(ogg_page *page);
- void video_write(void);
+ void video_write();
float get_time() const;
bool theora_eos;
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index f57853078d..b06cf513ba 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -172,7 +172,7 @@ void VisualScriptPropertySelector::_update_search() {
item->set_metadata(0, F->get().name);
item->set_icon(0, type_icons[F->get().type]);
item->set_metadata(1, "get");
- item->set_collapsed(1);
+ item->set_collapsed(true);
item->set_selectable(0, true);
item->set_selectable(1, false);
item->set_selectable(2, false);
@@ -257,7 +257,7 @@ void VisualScriptPropertySelector::_update_search() {
item->set_selectable(0, true);
item->set_metadata(1, "method");
- item->set_collapsed(1);
+ item->set_collapsed(true);
item->set_selectable(1, false);
item->set_selectable(2, false);
@@ -320,7 +320,7 @@ void VisualScriptPropertySelector::create_visualscript_item(const String &name,
item->set_metadata(0, name);
item->set_metadata(1, "action");
item->set_selectable(0, true);
- item->set_collapsed(1);
+ item->set_collapsed(true);
item->set_selectable(1, false);
item->set_selectable(2, false);
item->set_metadata(2, connecting);
diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp
index 0998977bb4..6c778d2809 100644
--- a/modules/webp/image_loader_webp.cpp
+++ b/modules/webp/image_loader_webp.cpp
@@ -135,7 +135,7 @@ Error webp_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
ERR_FAIL_COND_V_MSG(errdec, ERR_FILE_CORRUPT, "Failed decoding WebP image.");
- p_image->create(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image);
+ p_image->create(features.width, features.height, false, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image);
return OK;
}
diff --git a/modules/websocket/editor_debugger_server_websocket.cpp b/modules/websocket/editor_debugger_server_websocket.cpp
index cc8507227e..0cf78eaa9e 100644
--- a/modules/websocket/editor_debugger_server_websocket.cpp
+++ b/modules/websocket/editor_debugger_server_websocket.cpp
@@ -87,6 +87,6 @@ EditorDebuggerServerWebSocket::~EditorDebuggerServerWebSocket() {
}
EditorDebuggerServer *EditorDebuggerServerWebSocket::create(const String &p_protocol) {
- ERR_FAIL_COND_V(p_protocol != "ws://", NULL);
+ ERR_FAIL_COND_V(p_protocol != "ws://", nullptr);
return memnew(EditorDebuggerServerWebSocket);
}
diff --git a/modules/websocket/remote_debugger_peer_websocket.cpp b/modules/websocket/remote_debugger_peer_websocket.cpp
index f132b58e05..d156a39f53 100644
--- a/modules/websocket/remote_debugger_peer_websocket.cpp
+++ b/modules/websocket/remote_debugger_peer_websocket.cpp
@@ -123,12 +123,12 @@ RemoteDebuggerPeerWebSocket::RemoteDebuggerPeerWebSocket(Ref<WebSocketPeer> p_pe
}
RemoteDebuggerPeer *RemoteDebuggerPeerWebSocket::create(const String &p_uri) {
- ERR_FAIL_COND_V(!p_uri.begins_with("ws://") && !p_uri.begins_with("wss://"), NULL);
+ ERR_FAIL_COND_V(!p_uri.begins_with("ws://") && !p_uri.begins_with("wss://"), nullptr);
RemoteDebuggerPeerWebSocket *peer = memnew(RemoteDebuggerPeerWebSocket);
Error err = peer->connect_to_host(p_uri);
if (err != OK) {
memdelete(peer);
- return NULL;
+ return nullptr;
}
return peer;
}