DSP/LabelMap: Make label_t's definition hidden

Given this is a private struct and it's used in a container that
supports incomplete types, we can forward-declare it and move it into
the cpp file. While we're at it, we can change the name to Label to
follow our formatting guidelines.
This commit is contained in:
Lioncash 2019-06-07 17:37:45 -04:00
parent a3ed4ceec5
commit 32427af79e
2 changed files with 13 additions and 11 deletions

View File

@ -12,6 +12,17 @@
namespace DSP
{
struct LabelMap::Label
{
Label(const std::string& lbl, s32 address, LabelType ltype)
: name(lbl), addr(address), type(ltype)
{
}
std::string name;
s32 addr;
LabelType type;
};
LabelMap::LabelMap() = default;
LabelMap::~LabelMap() = default;

View File

@ -33,16 +33,7 @@ public:
void Clear();
private:
struct label_t
{
label_t(const std::string& lbl, s32 address, LabelType ltype)
: name(lbl), addr(address), type(ltype)
{
}
std::string name;
s32 addr;
LabelType type;
};
std::vector<label_t> labels;
struct Label;
std::vector<Label> labels;
};
} // namespace DSP