diff options
author | David Robillard <d@drobilla.net> | 2009-10-15 16:58:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-15 16:58:33 +0000 |
commit | 7743d332e41c7795dcbaa49511293f22597e4db7 (patch) | |
tree | c6018e89d3265698e992a3e96b77a25ae40675b6 /src/pprint.cpp | |
parent | cc8d52479fea5b2f4419463daf027ec11e813dc8 (diff) | |
download | resp-7743d332e41c7795dcbaa49511293f22597e4db7.tar.gz resp-7743d332e41c7795dcbaa49511293f22597e4db7.tar.bz2 resp-7743d332e41c7795dcbaa49511293f22597e4db7.zip |
Replace more use of at(0) with head().
git-svn-id: http://svn.drobilla.net/resp/tuplr@228 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/pprint.cpp')
-rw-r--r-- | src/pprint.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index ddbd403..1632f02 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -48,7 +48,7 @@ operator<<(ostream& out, const AST* ast) if (type) { switch (type->kind) { case AType::VAR: return out << "?" << type->id; - case AType::PRIM: return out << type->at(0); + case AType::PRIM: return out << type->head(); case AType::EXPR: break; // will catch Tuple case below } } @@ -69,10 +69,10 @@ pprint_internal(ostream& out, const AST* ast, unsigned indent) { const ATuple* tup = ast->to<const ATuple*>(); if (tup && tup->size() > 0) { - const string head = tup->at(0)->str(); - const ASymbol* headSym = tup->at(0)->to<const ASymbol*>(); + const string head = tup->head()->str(); + const ASymbol* headSym = tup->head()->to<const ASymbol*>(); out << "("; - pprint_internal(out, tup->at(0), indent); + pprint_internal(out, tup->head(), indent); unsigned child_indent = indent; if (tup->size() > 1) { out << " "; |