Cleanups for the parsers

This commit is contained in:
Paul Ferrand 2019-07-29 15:50:15 +02:00
parent 3f30c5f9de
commit d1343ef6f5
3 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ public:
int getNumMasters() const noexcept { return numMasters; }
int getNumCurves() const noexcept { return numCurves; }
protected:
void callback(std::string_view header, std::vector<sfz::Opcode> members) override
void callback(std::string_view header, std::vector<sfz::Opcode> members) final
{
switch (hash(header))
{

View file

@ -12,14 +12,14 @@ namespace sfz
class Synth: public Parser
{
public:
bool loadSfzFile(const std::filesystem::path& file) override;
bool loadSfzFile(const std::filesystem::path& file) final;
int getNumRegions() const noexcept { return regions.size(); }
int getNumGroups() const noexcept { return numGroups; }
int getNumMasters() const noexcept { return numMasters; }
int getNumCurves() const noexcept { return numCurves; }
const Region* getRegionView(int idx) { return idx < regions.size() ? &regions[idx] : nullptr; }
const Region* getRegionView(int idx) const noexcept { return idx < regions.size() ? &regions[idx] : nullptr; }
protected:
void callback(std::string_view header, std::vector<Opcode> members) override;
void callback(std::string_view header, std::vector<Opcode> members) final;
private:
bool hasGlobal { false };
bool hasControl { false };