From bff86e7185583c25eb433e239e7a70d3bf7158ae Mon Sep 17 00:00:00 2001 From: Malin E Date: Fri, 25 Mar 2022 16:46:21 +0100 Subject: [PATCH] Remove unused function --- .../launcher/src/profile/horizonsdialog.cpp | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp index 8840574592..54dc68ae35 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp @@ -62,51 +62,6 @@ namespace { constexpr const char* Years = "calendar years"; constexpr const char* Unitless = "equal intervals (unitless)"; - std::string trim(const std::string& text) { - std::string result = text; - if (text.empty()) - return ""; - - // front - while (result.front() == ' ') { - result = result.substr(1); - } - - // end - while (result.back() == ' ') { - result = result.substr(0, result.length() - 1); - } - - // middle - int offset = 0; - int start = -1; - int step = 1; - // Find start of gap - while ((start = result.find_first_of(' ', offset)) != std::string::npos) { - // Widen gap - while (result[start + step] == ' ') { - ++step; - } - - // Measure gap, if big then erase it - if (step > 1) { - result = result.erase(start, step); - - // Add one whitespace for readability - result = result.insert(start, " | "); - - step = 1; - offset = start; - } - - // Keep looking - offset = start + step; - step = 1; - } - - return result; - } - int findId(const std::string& match) { // Format: id, other information... std::stringstream str(match);