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
92394120
Unverified
Commit
92394120
authored
May 21, 2020
by
Rémi Verschelde
Committed by
GitHub
May 21, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38891 from bruvzg/fix_doc_const_order
Docs: Fix order of variant constants.
parents
78e22356
40956255
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
variant_call.cpp
core/variant_call.cpp
+11
-0
No files found.
core/variant_call.cpp
View file @
92394120
...
...
@@ -1174,6 +1174,9 @@ struct _VariantCall {
List
<
StringName
>
value_ordered
;
#endif
Map
<
StringName
,
Variant
>
variant_value
;
#ifdef DEBUG_ENABLED
List
<
StringName
>
variant_value_ordered
;
#endif
};
static
ConstantData
*
constant_data
;
...
...
@@ -1187,6 +1190,9 @@ struct _VariantCall {
static
void
add_variant_constant
(
int
p_type
,
StringName
p_constant_name
,
const
Variant
&
p_constant_value
)
{
constant_data
[
p_type
].
variant_value
[
p_constant_name
]
=
p_constant_value
;
#ifdef DEBUG_ENABLED
constant_data
[
p_type
].
variant_value_ordered
.
push_back
(
p_constant_name
);
#endif
}
};
...
...
@@ -1652,8 +1658,13 @@ void Variant::get_constants_for_type(Variant::Type p_type, List<StringName> *p_c
#endif
}
#ifdef DEBUG_ENABLED
for
(
List
<
StringName
>::
Element
*
E
=
cd
.
variant_value_ordered
.
front
();
E
;
E
=
E
->
next
())
{
p_constants
->
push_back
(
E
->
get
());
#else
for
(
Map
<
StringName
,
Variant
>::
Element
*
E
=
cd
.
variant_value
.
front
();
E
;
E
=
E
->
next
())
{
p_constants
->
push_back
(
E
->
key
());
#endif
}
}
...
...
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