Skip to content

Commit d4f25c0

Browse files
authored
fix wstring
1 parent 3839802 commit d4f25c0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libs/openFrameworks/utils/ofFileUtils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,11 @@ class ofFilePath {
450450
///
451451
/// \param strip_debug removes a trailing "Debug" if present
452452
/// \returns the App name as native string
453-
static auto getAppName(bool strip_debug = true) {
453+
static const auto getAppName(bool strip_debug = true) {
454454
auto name = ofFilePath::getCurrentExePathFS().filename().native();
455+
const std::filesystem::path::string_type debug_suffix = "Debug";
455456
if (strip_debug) {
456-
if (name.size() > 5 && name.compare(name.size() - 5, 5, "Debug") == 0) {
457+
if (name.size() > 5 && name.compare(name.size() - 5, 5, debug_suffix) == 0) {
457458
name.erase(name.size() - 5);
458459
}
459460
}

0 commit comments

Comments
 (0)