mirror of
https://github.com/znc/znc.git
synced 2026-08-10 10:52:59 +02:00
Prefer EndsWith(s) over Right(n) == s
This commit is contained in:
+1
-1
@@ -483,7 +483,7 @@ CString CFile::GetShortName() const { return m_sShortName; }
|
||||
CString CFile::GetDir() const {
|
||||
CString sDir(m_sLongName);
|
||||
|
||||
while (!sDir.empty() && sDir.Right(1) != "/" && sDir.Right(1) != "\\") {
|
||||
while (!sDir.empty() && !sDir.EndsWith("/") && !sDir.EndsWith("\\")) {
|
||||
sDir.RightChomp();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user