From 7743d332e41c7795dcbaa49511293f22597e4db7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Oct 2009 16:58:33 +0000 Subject: Replace more use of at(0) with head(). git-svn-id: http://svn.drobilla.net/resp/tuplr@228 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/pprint.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pprint.cpp') 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(); if (tup && tup->size() > 0) { - const string head = tup->at(0)->str(); - const ASymbol* headSym = tup->at(0)->to(); + const string head = tup->head()->str(); + const ASymbol* headSym = tup->head()->to(); out << "("; - pprint_internal(out, tup->at(0), indent); + pprint_internal(out, tup->head(), indent); unsigned child_indent = indent; if (tup->size() > 1) { out << " "; -- cgit v1.2.1