mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
srb2::music::TuneManager::insert: add optional field, to duplicate an existing tune's configuration
This commit is contained in:
parent
f7eddffdb4
commit
97a66a1856
1 changed files with 2 additions and 2 deletions
|
|
@ -44,9 +44,9 @@ public:
|
|||
return it != map_.end() ? const_cast<Tune*>(&it->second) : nullptr;
|
||||
}
|
||||
|
||||
Tune& insert(const char* id)
|
||||
Tune& insert(const char* id, const Tune* original = nullptr)
|
||||
{
|
||||
auto res = map_.emplace(id, Tune{});
|
||||
auto res = map_.emplace(id, original ? *original : Tune{});
|
||||
|
||||
SRB2_ASSERT(res.second);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue