From 4ec4178a215a093926f3fb0b1078323ccb389b19 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 5 Nov 2020 16:52:41 +0000 Subject: [PATCH] build_tools: Changed the `capitalise` argument of makeValidIdentifier() to `makeCamelCase` to make it clearer what it actually does --- .../juce_build_tools/utils/juce_BuildHelperFunctions.cpp | 6 +++--- .../juce_build_tools/utils/juce_BuildHelperFunctions.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp index c09fc220a5..1e193e5880 100644 --- a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp +++ b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp @@ -154,7 +154,7 @@ namespace build_tools return v; } - String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates, bool allowAsterisks) + String makeValidIdentifier (String s, bool makeCamelCase, bool removeColons, bool allowTemplates, bool allowAsterisks) { if (s.isEmpty()) return "unknown"; @@ -187,12 +187,12 @@ namespace build_tools auto n = words[0]; - if (capitalise) + if (makeCamelCase) n = n.toLowerCase(); for (int i = 1; i < words.size(); ++i) { - if (capitalise && words[i].length() > 1) + if (makeCamelCase && words[i].length() > 1) n << words[i].substring (0, 1).toUpperCase() << words[i].substring (1).toLowerCase(); else diff --git a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h index d82ca4160a..74da0fdd50 100644 --- a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h +++ b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h @@ -54,7 +54,7 @@ namespace build_tools } String makeValidIdentifier (String s, - bool capitalise, + bool makeCamelCase, bool removeColons, bool allowTemplates, bool allowAsterisks = false);