summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-07-06 08:06:22 +0200
committerGitHub <noreply@github.com>2016-07-06 08:06:22 +0200
commit4316a17c02383c8a07966dde6c8ed9d65a55a8b0 (patch)
tree2f3ed2a5c6f63e5b1cb51346706fc8de494ad129 /tools
parent647dc1e21422f1d501de2b80a5830a97f7ead0b4 (diff)
parenteecf4ff273a74ab8a71e6a8257032125c0254799 (diff)
Merge pull request #5564 from vnen/fix-xml-constants-sorting
Fix documentation constants sorting
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/doc_data.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 470dd078ae..14b937be38 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()) {
@@ -1052,7 +1037,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++) {