Skip to content
Browse files

Un-inlined some code to save a bit of space. (What is the opposite of…

… "inlined" anyway? Outlined? That ain't right.)
  • Loading branch information...
1 parent 7844a21 commit c9c5aa7ab9a6906c4a6fb805720f7a8b219393c7 @notahat notahat committed May 8, 2009
Showing with 6 additions and 4 deletions.
  1. +5 −3 AikoSExpression.cpp
  2. +1 −1 AikoSExpression.h
View
8 AikoSExpression.cpp
@@ -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;
@@ -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);
}
@@ -81,5 +84,4 @@ namespace Aiko {
return 0;
}
-
};
View
2 AikoSExpression.h
@@ -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:

0 comments on commit c9c5aa7

Please sign in to comment.
Something went wrong with that request. Please try again.