mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
Use the more efficient character literal overload for find_first_of/find_last_of
Recommendation from Clang-Tidy: https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html
This commit is contained in:
parent
78c7ef3039
commit
bf557ea6e6
3 changed files with 4 additions and 4 deletions
|
@ -186,12 +186,12 @@ gs_frame::gs_frame(const QString& title, const QRect& geometry, const QIcon& app
|
|||
|
||||
//Get version by substringing VersionNumber-buildnumber-commithash to get just the part before the dash
|
||||
std::string version = rpcs3::version.to_string();
|
||||
version = version.substr(0 , version.find_last_of("-"));
|
||||
version = version.substr(0 , version.find_last_of('-'));
|
||||
|
||||
//Add branch and commit hash to version on frame , unless it's master.
|
||||
if ((rpcs3::get_branch().compare("master") != 0) && (rpcs3::get_branch().compare("HEAD") != 0))
|
||||
{
|
||||
version = version + "-" + rpcs3::version.to_string().substr((rpcs3::version.to_string().find_last_of("-") + 1), 8) + "-" + rpcs3::get_branch();
|
||||
version = version + "-" + rpcs3::version.to_string().substr((rpcs3::version.to_string().find_last_of('-') + 1), 8) + "-" + rpcs3::get_branch();
|
||||
}
|
||||
|
||||
m_windowTitle += qstr(" | " + version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue