Skip to content

Commit

Permalink
strings and beans
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Dec 7, 2018
1 parent 68f62af commit 55a1a46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Themes/_fallback/BGAnimations/ScreenSystemLayer error.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--die
return {}
return Def.ActorFrame { }
6 changes: 3 additions & 3 deletions src/SongManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ SongManager::AddKeyedPointers(Song* new_song)
{
const vector<Steps*> steps = new_song->GetAllSteps();
for (size_t i = 0; i < steps.size(); ++i) {
const RString& ck = steps[i]->GetChartKey();
const string& ck = steps[i]->GetChartKey();
if (!StepsByKey.count(ck)) {
StepsByKey.emplace(ck, steps[i]);
if (!SongsByKey.count(ck)) {
Expand All @@ -633,15 +633,15 @@ SongManager::AddKeyedPointers(Song* new_song)
// Get a steps pointer given a chartkey, the assumption here is we want
// _a_ matching steps, not the original steps - mina
Steps*
SongManager::GetStepsByChartkey(RString ck)
SongManager::GetStepsByChartkey(const string& ck)
{
if (StepsByKey.count(ck))
return StepsByKey[ck];
return nullptr;
}

Song*
SongManager::GetSongByChartkey(RString ck)
SongManager::GetSongByChartkey(const string& ck)
{
if (SongsByKey.count(ck))
return SongsByKey[ck];
Expand Down
6 changes: 3 additions & 3 deletions src/SongManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class SongManager

// temporary solution to reorganizing the entire songid/stepsid system -
// mina
Steps* GetStepsByChartkey(RString ck);
Song* GetSongByChartkey(RString ck);
bool IsChartLoaded(RString ck)
Steps* GetStepsByChartkey(const string& ck);
Song* GetSongByChartkey(const string& ck);
bool IsChartLoaded(const string& ck)
{
return SongsByKey.count(ck) == 1 && StepsByKey.count(ck) == 1; // shouldn't be necessary but apparently it is -mina
}
Expand Down

0 comments on commit 55a1a46

Please sign in to comment.