Skip to content
Permalink
Browse files

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.
  • Loading branch information...
lioncash committed Jun 7, 2019
1 parent a3ed4ce commit 32427af79e0773489281b02f90af4bd2c5f161f6
Showing with 13 additions and 11 deletions.
  1. +11 −0 Source/Core/Core/DSP/LabelMap.cpp
  2. +2 −11 Source/Core/Core/DSP/LabelMap.h
@@ -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;
@@ -33,16 +33,7 @@ class LabelMap
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

0 comments on commit 32427af

Please sign in to comment.
You can’t perform that action at this time.