Skip to content

Commit

Permalink
Un-inlined some code to save a bit of space. (What is the opposite of…
Browse files Browse the repository at this point in the history
… "inlined" anyway? Outlined? That ain't right.)
  • Loading branch information
notahat committed May 8, 2009
1 parent 7844a21 commit c9c5aa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions AikoSExpression.cpp
Expand Up @@ -16,6 +16,10 @@ namespace Aiko {
s = skipWhitespace(s, tail);
return s;
}

unsigned char SExpression::isEqualTo(char* s) {
return size() == strlen(s) && strncmp(s, head_, size()) == 0;
}

char* SExpression::scanRawString(char* head, char* tail, SExpression* expression) {
char* s;
Expand Down Expand Up @@ -67,8 +71,7 @@ namespace Aiko {

if(array) array->length_ = 0;
while (s < tail && *s != ')') {
SExpression* expression = 0;
if (array) expression = &(array->expressions_[array->length_++]);
SExpression* expression = array ? &(array->expressions_[array->length_++]) : 0;
s = SExpression::scan(s, tail, expression);
}

Expand All @@ -81,5 +84,4 @@ namespace Aiko {
return 0;
}


};
2 changes: 1 addition & 1 deletion AikoSExpression.h
Expand Up @@ -12,7 +12,7 @@ namespace Aiko {
char* head() { return head_; }
char* tail() { return tail_; }
unsigned int size() { return tail_ - head_; }
unsigned char isEqualTo(char* s) { return size() == strlen(s) && strncmp(s, head_, size()) == 0; }
unsigned char isEqualTo(char* s);
unsigned char isArray() { return isArray_; }

protected:
Expand Down

0 comments on commit c9c5aa7

Please sign in to comment.