mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
Fixes a potential compilation error.
Pulling the template implementation into the header to guarantee that it's visible to all possible instantiations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ce6937701
commit
093147abf4
@ -128,7 +128,16 @@ private:
|
|||||||
|
|
||||||
/// \brief Skips all elements in the given container.
|
/// \brief Skips all elements in the given container.
|
||||||
template <typename ContainerT>
|
template <typename ContainerT>
|
||||||
bool skipContainer(const ContainerT &Container);
|
bool skipContainer(const ContainerT &Container) {
|
||||||
|
for (typename ContainerT::const_iterator I = Container.current(),
|
||||||
|
E = Container.end();
|
||||||
|
I != E; ++I) {
|
||||||
|
assert(*I != 0);
|
||||||
|
if (!skip(**I))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !failed();
|
||||||
|
}
|
||||||
|
|
||||||
/// \brief Skips to the next position behind the given JSON atom.
|
/// \brief Skips to the next position behind the given JSON atom.
|
||||||
bool skip(const JSONAtom &Atom);
|
bool skip(const JSONAtom &Atom);
|
||||||
|
@ -43,18 +43,6 @@ bool JSONParser::validate() {
|
|||||||
return skip(*parseRoot());
|
return skip(*parseRoot());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ContainerT>
|
|
||||||
bool JSONParser::skipContainer(const ContainerT &Container) {
|
|
||||||
for (typename ContainerT::const_iterator I = Container.current(),
|
|
||||||
E = Container.end();
|
|
||||||
I != E; ++I) {
|
|
||||||
assert(*I != 0);
|
|
||||||
if (!skip(**I))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return !failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool JSONParser::skip(const JSONAtom &Atom) {
|
bool JSONParser::skip(const JSONAtom &Atom) {
|
||||||
switch(Atom.getKind()) {
|
switch(Atom.getKind()) {
|
||||||
case JSONAtom::JK_Array: return skipContainer(*cast<JSONArray>(&Atom));
|
case JSONAtom::JK_Array: return skipContainer(*cast<JSONArray>(&Atom));
|
||||||
|
Loading…
Reference in New Issue
Block a user