mirror of
https://github.com/esuo1198/TaikoArcadeLoader.git
synced 2026-10-06 21:58:00 +03:00
Fix Axis | season title | clean up
This commit is contained in:
+14
-2
@@ -104,7 +104,7 @@ readConfigIntArray (const toml_table_t *table, const std::string &key, std::vect
|
||||
}
|
||||
|
||||
std::wstring
|
||||
replace (const std::wstring &orignStr, const std::wstring &oldStr, const std::wstring &newStr) {
|
||||
replace (const std::wstring orignStr, const std::wstring &oldStr, const std::wstring &newStr) {
|
||||
size_t pos = 0;
|
||||
std::wstring tempStr = orignStr;
|
||||
const std::wstring::size_type newStrLen = newStr.length ();
|
||||
@@ -121,7 +121,7 @@ replace (const std::wstring &orignStr, const std::wstring &oldStr, const std::ws
|
||||
}
|
||||
|
||||
std::string
|
||||
replace (const std::string &orignStr, const std::string &oldStr, const std::string &newStr) {
|
||||
replace (const std::string orignStr, const std::string &oldStr, const std::string &newStr) {
|
||||
size_t pos = 0;
|
||||
std::string tempStr = orignStr;
|
||||
const std::string::size_type newStrLen = newStr.length ();
|
||||
@@ -200,4 +200,16 @@ withFile (const char *fileName, std::function<void (u8 *)> callback) {
|
||||
|
||||
free (buffer);
|
||||
fclose (file);
|
||||
}
|
||||
|
||||
std::string
|
||||
season () {
|
||||
std::time_t time = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||
std::tm* tm = std::localtime(&time);
|
||||
int month = tm->tm_mon + 1;
|
||||
return std::to_string (tm->tm_year + 1900) + (
|
||||
(month >= 3 && month <= 5) ? "spr" :
|
||||
(month >= 6 && month <= 8) ? "sum" :
|
||||
(month >= 9 && month <= 11) ? "aut" : "win"
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user