Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
a0e33e17
Unverified
Commit
a0e33e17
authored
Mar 04, 2020
by
Rémi Verschelde
Committed by
GitHub
Mar 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36733 from qarmin/static_analyzer_fixes
Fixes bugs found by Sonarcloud and Coverity
parents
f83f1d7c
1f209bfc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
13 deletions
+25
-13
resource_format_binary.cpp
core/io/resource_format_binary.cpp
+2
-0
resource_loader.cpp
core/io/resource_loader.cpp
+1
-0
resource_loader.h
core/io/resource_loader.h
+1
-1
message_queue.cpp
core/message_queue.cpp
+4
-1
variant_parser.h
core/variant_parser.h
+1
-1
rendering_device_vulkan.cpp
drivers/vulkan/rendering_device_vulkan.cpp
+4
-1
resource_format_text.cpp
scene/resources/resource_format_text.cpp
+6
-6
rasterizer.h
servers/visual/rasterizer.h
+1
-0
rasterizer_effects_rd.cpp
servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp
+1
-1
rasterizer_storage_rd.cpp
servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp
+4
-2
No files found.
core/io/resource_format_binary.cpp
View file @
a0e33e17
...
...
@@ -1008,7 +1008,9 @@ String ResourceLoaderBinary::recognize(FileAccess *p_f) {
ResourceLoaderBinary
::
ResourceLoaderBinary
()
:
translation_remapped
(
false
),
ver_format
(
0
),
f
(
NULL
),
importmd_ofs
(
0
),
error
(
OK
)
{
progress
=
nullptr
;
...
...
core/io/resource_loader.cpp
View file @
a0e33e17
...
...
@@ -538,6 +538,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
if
(
r_error
)
{
*
r_error
=
err
;
}
thread_load_mutex
->
unlock
();
return
RES
();
}
thread_load_mutex
->
unlock
();
...
...
core/io/resource_loader.h
View file @
a0e33e17
...
...
@@ -116,7 +116,7 @@ private:
String
type_hint
;
float
progress
=
0
.
0
;
ThreadLoadStatus
status
=
THREAD_LOAD_IN_PROGRESS
;
Error
error
;
Error
error
=
OK
;
RES
resource
;
bool
xl_remapped
=
false
;
bool
use_sub_threads
=
false
;
...
...
core/message_queue.cpp
View file @
a0e33e17
...
...
@@ -268,7 +268,10 @@ void MessageQueue::flush() {
//using reverse locking strategy
_THREAD_SAFE_LOCK_
ERR_FAIL_COND
(
flushing
);
//already flushing, you did something odd
if
(
flushing
)
{
_THREAD_SAFE_UNLOCK_
ERR_FAIL_COND
(
flushing
);
//already flushing, you did something odd
}
flushing
=
true
;
while
(
read_pos
<
buffer_end
)
{
...
...
core/variant_parser.h
View file @
a0e33e17
...
...
@@ -77,7 +77,7 @@ public:
struct
ResourceParser
{
void
*
userdata
;
void
*
userdata
=
nullptr
;
ParseResourceFunc
func
;
ParseResourceFunc
ext_func
;
ParseResourceFunc
sub_func
;
...
...
drivers/vulkan/rendering_device_vulkan.cpp
View file @
a0e33e17
...
...
@@ -4182,7 +4182,10 @@ RenderingDeviceVulkan::DescriptorPool *RenderingDeviceVulkan::_descriptor_pool_a
descriptor_pool_create_info
.
poolSizeCount
=
sizes
.
size
();
descriptor_pool_create_info
.
pPoolSizes
=
sizes
.
ptr
();
VkResult
res
=
vkCreateDescriptorPool
(
device
,
&
descriptor_pool_create_info
,
NULL
,
&
pool
->
pool
);
ERR_FAIL_COND_V
(
res
,
NULL
);
if
(
res
)
{
memdelete
(
pool
);
ERR_FAIL_COND_V
(
res
,
NULL
);
}
descriptor_pools
[
p_key
].
insert
(
pool
);
}
...
...
scene/resources/resource_format_text.cpp
View file @
a0e33e17
...
...
@@ -403,8 +403,6 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars
return
Ref
<
PackedScene
>
();
}
}
return
packed_scene
;
}
Error
ResourceLoaderText
::
load
()
{
...
...
@@ -671,10 +669,6 @@ Error ResourceLoaderText::load() {
return
error
;
}
}
if
(
progress
)
{
*
progress
=
resource_current
/
float
(
resources_total
);
}
}
//for scene files
...
...
@@ -731,9 +725,15 @@ void ResourceLoaderText::set_translation_remapped(bool p_remapped) {
}
ResourceLoaderText
::
ResourceLoaderText
()
{
resources_total
=
0
;
resource_current
=
0
;
use_sub_threads
=
false
;
progress
=
nullptr
;
lines
=
false
;
translation_remapped
=
false
;
use_sub_threads
=
false
;
error
=
OK
;
}
ResourceLoaderText
::~
ResourceLoaderText
()
{
...
...
servers/visual/rasterizer.h
View file @
a0e33e17
...
...
@@ -1171,6 +1171,7 @@ public:
Command
*
n
=
c
->
next
;
if
(
c
==
commands
)
{
memdelete
(
commands
);
commands
=
NULL
;
}
else
{
c
->~
Command
();
}
...
...
servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp
View file @
a0e33e17
...
...
@@ -1081,7 +1081,7 @@ RasterizerEffectsRD::~RasterizerEffectsRD() {
RD
::
get_singleton
()
->
free
(
filter
.
image_uniform_set
);
}
if
(
RD
::
get_singleton
()
->
uniform_set_is_valid
(
filter
.
image_
uniform_set
))
{
if
(
RD
::
get_singleton
()
->
uniform_set_is_valid
(
filter
.
uniform_set
))
{
RD
::
get_singleton
()
->
free
(
filter
.
uniform_set
);
}
...
...
servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp
View file @
a0e33e17
...
...
@@ -1906,8 +1906,10 @@ void RasterizerStorageRD::mesh_add_surface(RID p_mesh, const VS::SurfaceData &p_
for
(
int
i
=
0
;
i
<
p_surface
.
blend_shapes
.
size
();
i
++
)
{
ERR_FAIL_COND
(
p_surface
.
blend_shapes
[
i
].
size
()
!=
p_surface
.
vertex_data
.
size
());
if
(
p_surface
.
blend_shapes
[
i
].
size
()
!=
p_surface
.
vertex_data
.
size
())
{
memdelete
(
s
);
ERR_FAIL_COND
(
p_surface
.
blend_shapes
[
i
].
size
()
!=
p_surface
.
vertex_data
.
size
());
}
RID
vertex_buffer
=
RD
::
get_singleton
()
->
vertex_buffer_create
(
p_surface
.
blend_shapes
[
i
].
size
(),
p_surface
.
blend_shapes
[
i
]);
s
->
blend_shapes
.
push_back
(
vertex_buffer
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment