summaryrefslogtreecommitdiff
path: root/core/resource.cpp
AgeCommit message (Collapse)Author
2020-06-08Core: Add hints to run with --verbose when leaking nodes/resources at exitRémi Verschelde
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
2020-04-15Fixes leaks in ResourceCache, Vulkan and X11qarmin
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-02-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-01-06Merge pull request #34296 from timothyqiu/lock-33072Rémi Verschelde
Fixes crash when using Resource::_take_over_path
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-12Fixes crash when using Resource::_take_over_pathHaoyu Qiu
2019-10-21Merge pull request #30622 from creikey/fix-path-cachingRémi Verschelde
PackedScene resources are freed before they are saved
2019-09-25Added some obvious errors explanationsqarmin
2019-08-17Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily
Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-07-25Some resources are freed before they are savedCameron Reikes
- PackedScenes freed before saved, so their path cache is lost - Solution is to move data to persistent static map - This patch will fix #30538
2019-04-11No more metadata and dependency indices kept in resources saved.Juan Linietsky
-Node folding is now saved externally together with the properties -External resources remember their ID when scenes are saved.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-01Fixed duplicating AnimationPlayers leaving empty tracks.DualMatrix
Fixed duplicating AnimationPlayers leaving empty tracks. I don't think duplicating arrays worked before. There was even this weird //does not make a long of sense but should work comment at the changed line. Fixes #21616
2018-08-20Crash fixes for material and animtreeJuan Linietsky
2018-07-02-Fixes to how hashing happened, now StringName and NodePath use default ↵Juan Linietsky
hasher, this was leading to some severe slowdown in scenarios -Fixes to some duplication scenarios for instanced scenes
2018-06-21Remove error messagesJuan Linietsky
2018-06-18-Added AnimationGraphPlayer (still missing features)Juan Linietsky
-Added ability to edit resources from built-in inspector (wip, needs testing and feedback)
2018-03-13Duplicate Arrays and Dictionaries when instancing scene in editorBojidar Marinov
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971
2018-01-18Make cyclic resource inclusion error message more helpfulletheed
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-12-04-Implemented Proxy Textures (needed to solve the problem with ViewportTexture)Juan Linietsky
-Properly use hierarchy to initialize resources local to scene (solves problem of GUI in 3D)
2017-09-06Fixes ERR_EXPLAIN being overwrittenIgnacio Etcheverry
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-10Removes type information from method bindsIgnacio Etcheverry
2017-08-07Makes all Godot API's methods Lower CaseIndah Sylvia
2017-08-05Made bool constructor explicit in Variant to avoid bugs, fixes #7843Juan Linietsky
2017-07-23Add object type hint for docsPoommetee Ketson
2017-06-28Reworked translation systemJuan Linietsky
-Label and Button reload translation on the fly -Resources are loaded and reload depending on locale
2017-05-17Removal of Image from Variant, converted to a Resource.Juan Linietsky
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-02-13Remove use of _SCS from ADD_METHODHein-Pieter van Braam
This saves typing and is a step towards fixing #56
2017-02-01Lot of work in new importer, importing textures now works.Juan Linietsky
2017-01-25Removed import/export system, will start new one from scratch.Juan Linietsky
2017-01-21WIP new AudioServer, with buses, effects, etc.Juan Linietsky
2017-01-16Style: Fix statements ending with ';;'Rémi Verschelde
2017-01-16Style: Cleanups, added headers, renamed filesRémi Verschelde
Made sure files in core/ and tools/ have a proper Godot license header when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h} to rect3.{cpp,h} and class_db.{cpp,h} respectively. Also added a proper header to core/io/base64.{c,h} after clarifying the licensing with the original author (public domain).
2017-01-14Style: Fix whole-line commented codeRémi Verschelde
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
2017-01-11Type renames:Juan Linietsky
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray