Skip to content

Commit 3a5e79d

Browse files
committed
fix
1 parent d4dfaf9 commit 3a5e79d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Common/Cpp/Options/CheckboxDropdownDatabase.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,36 +32,36 @@ struct FlagEnumEntry{
3232

3333
template <typename FlagEnum>
3434
class CheckboxDropdownDatabase{
35-
using FlagEnumEntry = FlagEnumEntry<FlagEnum>;
35+
using Entry = FlagEnumEntry<FlagEnum>;
3636

3737
public:
3838
CheckboxDropdownDatabase() = default;
39-
CheckboxDropdownDatabase(std::initializer_list<FlagEnumEntry> list){
39+
CheckboxDropdownDatabase(std::initializer_list<Entry> list){
4040
for (auto iter = list.begin(); iter != list.end(); ++iter){
4141
add(iter->value, std::move(iter->slug), std::move(iter->display));
4242
}
4343
}
4444

4545
// Warning, these functions do not have strong exception safety!
4646
// If these throw, this class will be in a bad state.
47-
void add(FlagEnumEntry entry){
48-
FlagEnumEntry& e = m_list.emplace_back(std::move(entry));
47+
void add(Entry entry){
48+
Entry& e = m_list.emplace_back(std::move(entry));
4949

5050
auto ret = m_slug_to_enum.emplace(e.slug, &e);
5151
if (!ret.second){
5252
throw InternalProgramError(nullptr, PA_CURRENT_FUNCTION, "Duplicate Enum Slug: " + e.slug);
5353
}
5454
}
5555
void add(FlagEnum value, std::string slug, std::string display){
56-
add(FlagEnumEntry{value, std::move(slug), std::move(display)});
56+
add(Entry{value, std::move(slug), std::move(display)});
5757
}
5858

5959

6060
public:
6161
size_t size() const{
6262
return m_list.size();
6363
}
64-
const FlagEnumEntry& operator[](size_t index) const{
64+
const Entry& operator[](size_t index) const{
6565
return m_list[index];
6666
}
6767
const FlagEnum* find_slug(const std::string& slug) const{
@@ -82,8 +82,8 @@ class CheckboxDropdownDatabase{
8282

8383

8484
private:
85-
std::vector<FlagEnumEntry> m_list;
86-
std::map<std::string, const FlagEnumEntry*> m_slug_to_enum;
85+
std::vector<Entry> m_list;
86+
std::map<std::string, const Entry*> m_slug_to_enum;
8787
};
8888

8989

0 commit comments

Comments
 (0)