Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Arrays and Dictionaries when instancing scene in editor #17382

Merged
merged 1 commit into from
Apr 8, 2018

Conversation

bojidar-bg
Copy link
Contributor

Fixes #13971.

@bojidar-bg
Copy link
Contributor Author

Ping @hpvb about the second commit of this PR, since the original code comes from 6565cf3.

@akien-mga akien-mga added this to the 3.1 milestone Mar 13, 2018
@akien-mga
Copy link
Member

The second commit would probably be better in its own PR to be merged quickly while the other change needs stricter review?

Also I can already see users asking for Array and Dictionary deep copy to be exposed to scripting langs. :)

@bojidar-bg
Copy link
Contributor Author

Wait, just realized I forgot to expose the deep parameter 😆

Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate

Fixes godotengine#13971
@@ -35,8 +35,8 @@
#include "variant.h"
#include "vector.h"

struct ArrayPrivate {

class ArrayPrivate {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? In C++ a Class with only public members is perfectly equivalent to a struct in every way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang complains otherwise.

@reduz reduz merged commit 4ee3f32 into godotengine:master Apr 8, 2018
@bojidar-bg bojidar-bg deleted the 13971-path-array-unsaved branch April 9, 2018 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants