Skip to content

Commit d61d48b

Browse files
committed
JsonStthm : Fix not const JsonValue in JsonValue::Iterator operators
1 parent 36e1c03 commit d61d48b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

JsonStthm/JsonStthm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ namespace JsonStthm
123123
m_pChild = m_pChild->m_pNext;
124124
}
125125

126-
JsonValue& JsonValue::Iterator::operator*() const
126+
const JsonValue& JsonValue::Iterator::operator*() const
127127
{
128128
return m_pChild != NULL ? *m_pChild : INVALID;
129129
}
130130

131-
JsonValue* JsonValue::Iterator::operator->() const
131+
const JsonValue* JsonValue::Iterator::operator->() const
132132
{
133133
return m_pChild;
134134
}

JsonStthm/JsonStthm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ namespace JsonStthm
179179
bool IsValid() const;
180180
bool operator!=(const Iterator& oIte) const;
181181
void operator++();
182-
JsonValue& operator*() const;
183-
JsonValue* operator->() const;
182+
const JsonValue& operator*() const;
183+
const JsonValue* operator->() const;
184184
protected:
185-
JsonValue* m_pChild;
185+
const JsonValue* m_pChild;
186186
};
187187

188188
static JsonValue INVALID;

0 commit comments

Comments
 (0)