summaryrefslogtreecommitdiffstats
path: root/core/resource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Core: Add hints to run with --verbose when leaking nodes/resources at exitRémi Verschelde2020-06-081-8/+9
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-14/+28
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-52/+0
| | | | | | | | | | | | | | 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.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-11/+1
| | | | | | | | | | 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.
* Fixes leaks in ResourceCache, Vulkan and X11qarmin2020-04-151-0/+3
|
* Replace NULL with nullptrlupoDharkael2020-04-021-10/+10
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-4/+4
| | | | | | | | | | 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`.
* Added StringName as a variant type.Juan Linietsky2020-02-211-1/+1
| | | | Also changed all relevant properties defined manually to StringName.
* Merge pull request #34296 from timothyqiu/lock-33072Rémi Verschelde2020-01-061-1/+4
|\ | | | | Fixes crash when using Resource::_take_over_path
| * Fixes crash when using Resource::_take_over_pathHaoyu Qiu2019-12-121-1/+4
| |
* | Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
|/ | | | | | | | | | | 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.
* Merge pull request #30622 from creikey/fix-path-cachingRémi Verschelde2019-10-211-5/+35
|\ | | | | PackedScene resources are freed before they are saved
| * Some resources are freed before they are savedCameron Reikes2019-07-251-5/+35
| | | | | | | | | | | | - PackedScenes freed before saved, so their path cache is lost - Solution is to move data to persistent static map - This patch will fix #30538
* | Added some obvious errors explanationsqarmin2019-09-251-2/+2
| |
* | Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-171-5/+3
|/ | | | | | | | | 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?)
* No more metadata and dependency indices kept in resources saved.Juan Linietsky2019-04-111-0/+20
| | | | | -Node folding is now saved externally together with the properties -External resources remember their ID when scenes are saved.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* -Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky2018-11-081-2/+2
| | | | -Removed one and zero hints for properties, replaced by default value
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-4/+5
| | | | | | 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.
* Fixed duplicating AnimationPlayers leaving empty tracks.DualMatrix2018-09-011-1/+1
| | | | | | | 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
* Crash fixes for material and animtreeJuan Linietsky2018-08-201-2/+4
|
* -Fixes to how hashing happened, now StringName and NodePath use default ↵Juan Linietsky2018-07-021-6/+11
| | | | | | hasher, this was leading to some severe slowdown in scenarios -Fixes to some duplication scenarios for instanced scenes
* Remove error messagesJuan Linietsky2018-06-211-1/+1
|
* -Added AnimationGraphPlayer (still missing features)Juan Linietsky2018-06-181-1/+0
| | | | -Added ability to edit resources from built-in inspector (wip, needs testing and feedback)
* Duplicate Arrays and Dictionaries when instancing scene in editorBojidar Marinov2018-03-131-1/+1
| | | | | | Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971
* Make cyclic resource inclusion error message more helpfulletheed2018-01-181-1/+1
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-2/+2
|
* -Implemented Proxy Textures (needed to solve the problem with ViewportTexture)Juan Linietsky2017-12-041-0/+29
| | | | -Properly use hierarchy to initialize resources local to scene (solves problem of GUI in 3D)
* Fixes ERR_EXPLAIN being overwrittenIgnacio Etcheverry2017-09-061-2/+1
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-2/+2
|
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-071-2/+2
|
* Made bool constructor explicit in Variant to avoid bugs, fixes #7843Juan Linietsky2017-08-051-0/+1
|
* Add object type hint for docsPoommetee Ketson2017-07-231-2/+1
|
* Reworked translation systemJuan Linietsky2017-06-281-3/+29
| | | | | -Label and Button reload translation on the fly -Resources are loaded and reload depending on locale
* Removal of Image from Variant, converted to a Resource.Juan Linietsky2017-05-171-1/+1
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-129/+92
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-12/+12
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-3/+3
| | | | This saves typing and is a step towards fixing #56
* Lot of work in new importer, importing textures now works.Juan Linietsky2017-02-011-0/+1
|
* Removed import/export system, will start new one from scratch.Juan Linietsky2017-01-251-130/+0
|
* WIP new AudioServer, with buses, effects, etc.Juan Linietsky2017-01-211-0/+1
|
* Style: Fix statements ending with ';;'Rémi Verschelde2017-01-161-3/+3
|
* Style: Cleanups, added headers, renamed filesRémi Verschelde2017-01-161-1/+3
| | | | | | | | | 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).
* Style: Fix whole-line commented codeRémi Verschelde2017-01-141-5/+6
| | | | | 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.
* Type renames:Juan Linietsky2017-01-111-2/+2
| | | | | | | | | | | | Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray