MCPcopy Create free account
hub / github.com/KDE/kdevelop / validate

Method validate

kdevplatform/util/formattinghelpers.cpp:207–217  ·  view source on GitHub ↗

* Validate brackets and comments once parsing ends. * @return @c false if matching brackets or comments fails. * @note Validation is destructive, that is, it transitions this object into an undefined state. */

Source from the content-addressed store, hash-verified

205 * @note Validation is destructive, that is, it transitions this object into an undefined state.
206 */
207 bool validate()
208 {
209 for (std::size_t i = 0; i < m_stacks.size(); ++i) {
210 if (!m_stacks[i].validate()) {
211 qCWarning(UTIL) << "giving up formatting because the formatter inserted or removed the pair"
212 << m_stackStrings[i] << "across context-text boundaries";
213 return false;
214 }
215 }
216 return true;
217 }
218
219private:
220 // the following 3 constants are indices into m_stacks and m_stackStrings

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
validateMethod · 0.45

Tested by

no test coverage detected