Initialize with = instead of braces, and drop const from local autos
Scalars get = 0, = false or = nullptr. Standard containers and strings rely on their constructors.
Other types get = {} or = value, and lists keep = {...}.
glm types are left alone until they're replaced.
This commit is contained in:
1 parent
666f65bf3a
commit
40f6b554b5
138 files changed
+1500
-1500
No files matched your search
+4
-4
@@ -8,10 +8,10 @@
|
||||
|
||||
struct AudioEntry
|
||||
{
|
||||
MIX_Audio* audio{};
|
||||
std::vector<MIX_Track*> tracks{}; // one per overlapping play, reused once finished
|
||||
MIX_Audio* audio = nullptr;
|
||||
std::vector<MIX_Track*> tracks; // one per overlapping play, reused once finished
|
||||
std::atomic<float> squares[2]{};
|
||||
std::atomic<int> sampleCount{};
|
||||
std::atomic<int> sampleCount = {};
|
||||
};
|
||||
|
||||
// Sums the squares of the left/right samples the track plays, for its levels.
|
||||
@@ -28,7 +28,7 @@
|
||||
entry->sampleCount += samples / channels;
|
||||
}
|
||||
|
||||
static std::unordered_map<std::uint64_t, AudioEntry> entries{};
|
||||
static std::unordered_map<std::uint64_t, AudioEntry> entries;
|
||||
|
||||
static MIX_Mixer* audio_mixer_get()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user