diff options
| author | George Marques | 2016-07-05 16:57:17 -0300 |
|---|---|---|
| committer | Rémi Verschelde | 2016-07-08 19:01:59 +0200 |
| commit | 9420a1b6c11c39c3b8b41be37342fe89cde6e273 (patch) | |
| tree | fe74b8d35e0b96238ee498950b7a40557c099433 /tools/doc/doc_data.cpp | |
| parent | 8aeacd935c005be27c3c34aa9e8cc616ec5e6ddd (diff) | |
| download | godot-9420a1b6c11c39c3b8b41be37342fe89cde6e273.tar.gz godot-9420a1b6c11c39c3b8b41be37342fe89cde6e273.tar.zst godot-9420a1b6c11c39c3b8b41be37342fe89cde6e273.zip | |
Make sure builtin types' constants remain in order
This adds a list of constants for VariantCall to make sure the order of
register is kept when showing in the editor help and in the documentation.
This also remove the sorting of constants from the doctool, so it keeps
the natural order in classes.xml.
(cherry picked from commit 29b62ce5d009bfdc57e065e450d7e01c5bd5bd05)
Diffstat (limited to '')
| -rw-r--r-- | tools/doc/doc_data.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index a08f3b7b7..20506a6a9 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -36,21 +36,6 @@ #include "io/compression.h" #include "scene/resources/theme.h" -struct _ConstantComparator { - - inline bool operator()(const DocData::ConstantDoc &a, const DocData::ConstantDoc &b) const { - String left_a = a.name.find("_") == -1 ? a.name : a.name.substr(0, a.name.find("_")); - String left_b = b.name.find("_") == -1 ? b.name : b.name.substr(0, b.name.find("_")); - if (left_a == left_b) // If they have the same prefix - if (a.value == b.value) - return a.name < b.name; // Sort by name if the values are the same - else - return a.value < b.value; // Sort by value otherwise - else - return left_a < left_b; // Sort by name if the prefixes aren't the same - } -}; - void DocData::merge_from(const DocData& p_data) { for( Map<String,ClassDoc>::Element *E=class_list.front();E;E=E->next()) { @@ -1042,7 +1027,6 @@ Error DocData::save(const String& p_path) { _write_string(f,1,"<constants>"); - c.constants.sort_custom<_ConstantComparator>(); for(int i=0;i<c.constants.size();i++) { |
