Skip to content

Commit a2ccc8e

Browse files
committed
if this doesnt work im reverting it
1 parent fb9b6b9 commit a2ccc8e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Utils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ void Utils::popualteSongToSongDataMap() {
473473
std::vector<std::string> tempKeys = {};
474474
std::error_code ec, ed;
475475

476-
for (const std::string_view song : songManager.getSongs()) {
476+
for (const std::string& song : songManager.getSongs()) {
477477
SongType songType = SongType::Regular;
478478
if (std::ranges::find(blacklist.begin(), blacklist.end(), song) != blacklist.end()) songType = SongType::Blacklisted;
479479
else if (std::ranges::find(favorites.begin(), favorites.end(), song) != favorites.end()) songType = SongType::Favorited;
@@ -484,7 +484,7 @@ void Utils::popualteSongToSongDataMap() {
484484
std::filesystem::file_time_type fileTime = std::filesystem::last_write_time(theirPath, ed);
485485

486486
SongData songData = {
487-
.actualFilePath = std::string(song),
487+
.actualFilePath = song,
488488
.fileExtension = Utils::toNormalizedString(theirPath.extension()),
489489
.fileName = Utils::toNormalizedString(theirPath.filename()),
490490
.type = songType, .songFileSize = ec ? std::numeric_limits<std::uintmax_t>::max() : fileSize,
@@ -644,11 +644,11 @@ std::string Utils::toNormalizedString(const std::filesystem::path& path) {
644644
return geode::utils::string::pathToString(path);
645645
}
646646

647-
std::filesystem::path Utils::toProblematicString(const std::string_view path) {
647+
std::filesystem::path Utils::toProblematicString(const std::string& path) {
648648
#ifdef GEODE_IS_WINDOWS
649649
/* TODO FOR GEODE V5: SWAP COMMENTED LINES */
650-
// return std::filesystem::path(geode::utils::string::utf8ToWide(std::string(path)).unwrapOr(""));
651-
return std::filesystem::path(geode::utils::string::utf8ToWide(std::string(path)));
650+
// return std::filesystem::path(geode::utils::string::utf8ToWide(path).unwrapOr(""));
651+
return std::filesystem::path(geode::utils::string::utf8ToWide(path));
652652
#else
653653
return std::filesystem::path(path);
654654
#endif

src/Utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Utils {
3232
static int getSongID();
3333
static std::string currentCustomSong();
3434
static std::string toNormalizedString(const std::filesystem::path& path);
35-
static std::filesystem::path toProblematicString(const std::string_view);
35+
static std::filesystem::path toProblematicString(const std::string&);
3636
static void fadeOutCardRemotely(cocos2d::CCNode* card = Utils::findCardRemotely());
3737
static void removeCardRemotely(cocos2d::CCNode* card = Utils::findCardRemotely());
3838
static void queueUpdateFrontfacingLabelsInSCMAndSLL();

0 commit comments

Comments
 (0)