@@ -24,7 +24,7 @@ TypeCategoryMap::TypeCategoryMap(IFormatChangeListener *lst)
24
24
Enable (default_cs, First);
25
25
}
26
26
27
- void TypeCategoryMap::Add (KeyType name, const ValueSP &entry) {
27
+ void TypeCategoryMap::Add (KeyType name, const TypeCategoryImplSP &entry) {
28
28
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
29
29
m_map[name] = entry;
30
30
if (listener)
@@ -45,21 +45,21 @@ bool TypeCategoryMap::Delete(KeyType name) {
45
45
46
46
bool TypeCategoryMap::Enable (KeyType category_name, Position pos) {
47
47
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
48
- ValueSP category;
48
+ TypeCategoryImplSP category;
49
49
if (!Get (category_name, category))
50
50
return false ;
51
51
return Enable (category, pos);
52
52
}
53
53
54
54
bool TypeCategoryMap::Disable (KeyType category_name) {
55
55
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
56
- ValueSP category;
56
+ TypeCategoryImplSP category;
57
57
if (!Get (category_name, category))
58
58
return false ;
59
59
return Disable (category);
60
60
}
61
61
62
- bool TypeCategoryMap::Enable (ValueSP category, Position pos) {
62
+ bool TypeCategoryMap::Enable (TypeCategoryImplSP category, Position pos) {
63
63
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
64
64
if (category.get ()) {
65
65
Position pos_w = pos;
@@ -81,7 +81,7 @@ bool TypeCategoryMap::Enable(ValueSP category, Position pos) {
81
81
return false ;
82
82
}
83
83
84
- bool TypeCategoryMap::Disable (ValueSP category) {
84
+ bool TypeCategoryMap::Disable (TypeCategoryImplSP category) {
85
85
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
86
86
if (category.get ()) {
87
87
m_active_categories.remove_if (delete_matching_categories (category));
@@ -93,7 +93,7 @@ bool TypeCategoryMap::Disable(ValueSP category) {
93
93
94
94
void TypeCategoryMap::EnableAllCategories () {
95
95
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
96
- std::vector<ValueSP > sorted_categories (m_map.size (), ValueSP ());
96
+ std::vector<TypeCategoryImplSP > sorted_categories (m_map.size (), TypeCategoryImplSP ());
97
97
MapType::iterator iter = m_map.begin (), end = m_map.end ();
98
98
for (; iter != end; ++iter) {
99
99
if (iter->second ->IsEnabled ())
@@ -102,7 +102,7 @@ void TypeCategoryMap::EnableAllCategories() {
102
102
if (pos >= sorted_categories.size ()) {
103
103
auto iter = std::find_if (
104
104
sorted_categories.begin (), sorted_categories.end (),
105
- [](const ValueSP &sp) -> bool { return sp.get () == nullptr ; });
105
+ [](const TypeCategoryImplSP &sp) -> bool { return sp.get () == nullptr ; });
106
106
pos = std::distance (sorted_categories.begin (), iter);
107
107
}
108
108
sorted_categories.at (pos) = iter->second ;
@@ -130,7 +130,7 @@ void TypeCategoryMap::Clear() {
130
130
listener->Changed ();
131
131
}
132
132
133
- bool TypeCategoryMap::Get (KeyType name, ValueSP &entry) {
133
+ bool TypeCategoryMap::Get (KeyType name, TypeCategoryImplSP &entry) {
134
134
std::lock_guard<std::recursive_mutex> guard (m_map_mutex);
135
135
MapIterator iter = m_map.find (name);
136
136
if (iter == m_map.end ())
0 commit comments