aboutsummaryrefslogtreecommitdiff
path: root/src/processor/postfix_evaluator-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/postfix_evaluator-inl.h')
-rw-r--r--src/processor/postfix_evaluator-inl.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/processor/postfix_evaluator-inl.h b/src/processor/postfix_evaluator-inl.h
index d7dbeac2..f567b1c8 100644
--- a/src/processor/postfix_evaluator-inl.h
+++ b/src/processor/postfix_evaluator-inl.h
@@ -58,19 +58,19 @@ using std::ostringstream;
// before returning failure.
class AutoStackClearer {
public:
- explicit AutoStackClearer(vector<string> *stack) : stack_(stack) {}
+ explicit AutoStackClearer(vector<string>* stack) : stack_(stack) {}
~AutoStackClearer() { stack_->clear(); }
private:
- vector<string> *stack_;
+ vector<string>* stack_;
};
template<typename ValueType>
bool PostfixEvaluator<ValueType>::EvaluateToken(
- const string &token,
- const string &expression,
- DictionaryValidityType *assigned) {
+ const string& token,
+ const string& expression,
+ DictionaryValidityType* assigned) {
// There are enough binary operations that do exactly the same thing
// (other than the specific operation, of course) that it makes sense
// to share as much code as possible.
@@ -203,8 +203,8 @@ bool PostfixEvaluator<ValueType>::EvaluateToken(
template<typename ValueType>
bool PostfixEvaluator<ValueType>::EvaluateInternal(
- const string &expression,
- DictionaryValidityType *assigned) {
+ const string& expression,
+ DictionaryValidityType* assigned) {
// Tokenize, splitting on whitespace.
istringstream stream(expression);
string token;
@@ -231,8 +231,8 @@ bool PostfixEvaluator<ValueType>::EvaluateInternal(
}
template<typename ValueType>
-bool PostfixEvaluator<ValueType>::Evaluate(const string &expression,
- DictionaryValidityType *assigned) {
+bool PostfixEvaluator<ValueType>::Evaluate(const string& expression,
+ DictionaryValidityType* assigned) {
// Ensure that the stack is cleared before returning.
AutoStackClearer clearer(&stack_);
@@ -250,8 +250,8 @@ bool PostfixEvaluator<ValueType>::Evaluate(const string &expression,
}
template<typename ValueType>
-bool PostfixEvaluator<ValueType>::EvaluateForValue(const string &expression,
- ValueType *result) {
+bool PostfixEvaluator<ValueType>::EvaluateForValue(const string& expression,
+ ValueType* result) {
// Ensure that the stack is cleared before returning.
AutoStackClearer clearer(&stack_);
@@ -271,7 +271,7 @@ bool PostfixEvaluator<ValueType>::EvaluateForValue(const string &expression,
template<typename ValueType>
typename PostfixEvaluator<ValueType>::PopResult
PostfixEvaluator<ValueType>::PopValueOrIdentifier(
- ValueType *value, string *identifier) {
+ ValueType* value, string* identifier) {
// There needs to be at least one element on the stack to pop.
if (!stack_.size())
return POP_RESULT_FAIL;
@@ -314,7 +314,7 @@ PostfixEvaluator<ValueType>::PopValueOrIdentifier(
template<typename ValueType>
-bool PostfixEvaluator<ValueType>::PopValue(ValueType *value) {
+bool PostfixEvaluator<ValueType>::PopValue(ValueType* value) {
ValueType literal = ValueType();
string token;
PopResult result;
@@ -343,14 +343,14 @@ bool PostfixEvaluator<ValueType>::PopValue(ValueType *value) {
template<typename ValueType>
-bool PostfixEvaluator<ValueType>::PopValues(ValueType *value1,
- ValueType *value2) {
+bool PostfixEvaluator<ValueType>::PopValues(ValueType* value1,
+ ValueType* value2) {
return PopValue(value2) && PopValue(value1);
}
template<typename ValueType>
-void PostfixEvaluator<ValueType>::PushValue(const ValueType &value) {
+void PostfixEvaluator<ValueType>::PushValue(const ValueType& value) {
ostringstream token_stream;
token_stream << value;
stack_.push_back(token_stream.str());