Refactor: breakout function definition to cpp file

pull/5/head
rkcf 2023-02-26 05:49:13 -06:00
parent 145677f0f2
commit 6abdf89009
2 changed files with 10 additions and 7 deletions

8
src/wavetable.cpp Normal file
View File

@ -0,0 +1,8 @@
#include "wavetable.h"
std::string Wavetable::name() {
std::string id_str = std::to_string(m_id);
id_str.append(": ");
id_str.append(m_name);
return id_str;
}

View File

@ -15,12 +15,7 @@ private:
std::array<Wave, DEFAULT_N_SAMPLES> m_table; // table data std::array<Wave, DEFAULT_N_SAMPLES> m_table; // table data
public: public:
std::string name() { std::string name();
std::string id_str = std::to_string(m_id);
id_str.append(": ");
id_str.append(m_name);
return id_str;
}
void set_table(std::array<Wave, DEFAULT_N_SAMPLES> table) { m_table = table; } void set_table(std::array<Wave, DEFAULT_N_SAMPLES> table) { m_table = table; }
}; };