From 32427af79e0773489281b02f90af4bd2c5f161f6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 7 Jun 2019 17:37:45 -0400 Subject: [PATCH] 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. --- Source/Core/Core/DSP/LabelMap.cpp | 11 +++++++++++ Source/Core/Core/DSP/LabelMap.h | 13 ++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/DSP/LabelMap.cpp b/Source/Core/Core/DSP/LabelMap.cpp index d2ac003f23..dd045c5a44 100644 --- a/Source/Core/Core/DSP/LabelMap.cpp +++ b/Source/Core/Core/DSP/LabelMap.cpp @@ -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; diff --git a/Source/Core/Core/DSP/LabelMap.h b/Source/Core/Core/DSP/LabelMap.h index 5458785610..e9bcd3950b 100644 --- a/Source/Core/Core/DSP/LabelMap.h +++ b/Source/Core/Core/DSP/LabelMap.h @@ -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 labels; + struct Label; + std::vector