summaryrefslogtreecommitdiffstats
path: root/core/io/config_file.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-9/+18
| | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | | 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-26/+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.
* Replace NULL with nullptrlupoDharkael2020-04-021-1/+1
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-2/+2
| | | | | | | | | | 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`.
* ConfigFile: Improve error messages and complete docsRémi Verschelde2020-03-051-9/+9
|
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-4/+4
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Rewritten StreamTexture for better code reuse, added basis universal supportJuan Linietsky2020-02-111-1/+2
|
* Add ConfigFile::parse()Pedro J. Estébanez2020-02-101-4/+21
|
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* 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.
* Added a method to erase section key in ConfigFileGianlluca2019-10-071-0/+8
|
* Added some obvious errors explanationsqarmin2019-09-251-1/+1
|
* Support for file not found in ConfigFile::Load and handle a few specific casesPouleyKetchoupp2019-08-211-1/+1
| | | | | | | EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist EditorPlugin::get_config: removed (not used) Fixes #31444
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-171-5/+2
| | | | | | | | | 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?)
* Add encrypted files support to ConfigFileVasiliy Makarov2019-06-271-2/+92
| | | | | | | | | Fix #26477 Add in ConfigFile this methods: load_encrypted(path, key) load_encrypted_pass(path, password) save_encrypted(path, key) save_encrypted_pass(path, password)
* Small fixes to unrechable code, possibly overflows, using NULL pointersqarmin2019-06-031-4/+0
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+4
| | | | | | 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.
* 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!
* make ConfigFile sections orderedKarroffel2017-11-041-5/+5
|
* make ConfigFile use OrderedHashMapKarroffel2017-11-031-8/+8
|
* 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-3/+3
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Suppress error messages when using ConfigFile::get_value and a default is givenBojidar Marinov2017-03-211-2/+7
| | | | Fixes #8097
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-71/+57
| | | | | | | | | | | | | | | | | | | | | | | | 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-9/+9
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Lot of work in new importer, importing textures now works.Juan Linietsky2017-02-011-0/+5
|
* Type renames:Juan Linietsky2017-01-111-4/+4
| | | | | | | | | | | | Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-8/+8
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* classref: Directory and ConfigFileRémi Verschelde2016-05-121-1/+1
|
* -fix stray file left open when parsing configuration, closes #3299Juan Linietsky2016-01-101-1/+3
|
* make sure file is closed if something failsJuan Linietsky2016-01-101-0/+2
|
* -Use simpler methods for parsing simple tags, fixes #3274Juan Linietsky2016-01-081-1/+1
|
* -fix bugs related to parsing config files with new variantparser, closes ↵Juan Linietsky2016-01-071-0/+4
| | | | #3248 closes #3207
* Added default value param to ConfigFile.get_value()Ignacio Etcheverry2016-01-011-4/+4
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* Merge branch 'master' of https://github.com/godotengine/godotJuan Linietsky2015-12-311-1/+1
|\
| * Add missing argument names in GDScript bindingsRémi Verschelde2015-12-281-1/+1
| | | | | | | | | | All classes were reviewed apart from VisualServer for which no argument name is documented at all. While doing this review, I found quite a few bugs that were fixed either in earlier commits or this one (mostly documentation bugs though, i.e. some arguments were listed at the wrong place).
* | -Ensure .tscn and .tres always save in a deterministic way, fixes #2495Juan Linietsky2015-12-311-558/+27
|/ | | | | | | -Scene edit state is saved outside the scene now, to avoid changes .tscn files when nothing really changed -Created a VariantWriter helper to unify all variant to text writing -Moved SceneFormatText writing to VariantWriter -Moved ConfigFile to use VariantWriter and VariantParser, added compatibility mode for old .cfg files that use engine.cfg format
* Fixes problem parsing config files using ConfigFileJuan Linietsky2015-05-121-0/+2
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* Fix CppCheck 'duplicateExpression' warningBoris Egorov2014-11-071-1/+1
| | | | | BTW, all three cases looks similar. It would be nice to refactor it to avoid repeating code.
* -Much improvement to baked light bakerJuan Linietsky2014-10-271-2/+5
| | | | | | | -Fixed many bugs in stretch mode -Fixes to camera project and unproject as consequence of the above -added setget to script (documented in script doc) -more fixes to collada exporter for blender
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+744