From 5980b1ffb00df3c78abfcb747437bad32a5bff35 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Tue, 9 Jul 2024 03:44:51 +0000 Subject: [PATCH] Style cleanup --- .../Mac-Cocoa/PLSPatcherWindowController.mm | 1 - Sources/Plasma/CoreLib/plFileSystem.cpp | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcherWindowController.mm b/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcherWindowController.mm index 95e6382c2f..d6675e06ec 100644 --- a/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcherWindowController.mm +++ b/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcherWindowController.mm @@ -91,7 +91,6 @@ - (void)patcherCompleted:(nonnull PLSPatcher *)patcher didSelfPatch:(BOOL)selfPa // intercepted by the application } - - (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change diff --git a/Sources/Plasma/CoreLib/plFileSystem.cpp b/Sources/Plasma/CoreLib/plFileSystem.cpp index d3de746b0d..6b1717b538 100644 --- a/Sources/Plasma/CoreLib/plFileSystem.cpp +++ b/Sources/Plasma/CoreLib/plFileSystem.cpp @@ -84,19 +84,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ST::string plFileName::GetFileName() const { - if(fName.ends_with("/")) - { + if (fName.ends_with("/")) return plFileName(fName.before_last('/')).GetFileName(); - } - ST_ssize_t end = fName.find_last('/'); - if (end < 0) - end = fName.find_last('\\'); - if (end < 0) - return fName; - - return fName.substr(end + 1); -} - ST::string plFileName::GetFileExt() const { ST_ssize_t dot = fName.find_last('.');