aboutsummaryrefslogtreecommitdiff
path: root/eval.h
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2016-02-08 14:32:56 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2016-02-08 14:32:56 +0900
commit7a2659e0650ca265c44a654732efd69404d6585a (patch)
tree9cef17795be3329e0e3c41a88be2854ec57e21f2 /eval.h
parentbdfa4dac051cd5bf23e6d0c620df2b472c73c67b (diff)
downloadkati-7a2659e0650ca265c44a654732efd69404d6585a.tar.gz
[C++] Stop using shared_ptr in eval
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/eval.h b/eval.h
index c25edff..cb03d5d 100644
--- a/eval.h
+++ b/eval.h
@@ -15,7 +15,6 @@
#ifndef EVAL_H_
#define EVAL_H_
-#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -53,7 +52,7 @@ class Evaluator {
const Loc& loc() const { return loc_; }
void set_loc(const Loc& loc) { loc_ = loc; }
- const vector<shared_ptr<Rule>>& rules() const { return rules_; }
+ const vector<const Rule*>& rules() const { return rules_; }
const unordered_map<Symbol, Vars*>& rule_vars() const {
return rule_vars_;
}
@@ -100,7 +99,7 @@ class Evaluator {
Vars* vars_;
unordered_map<Symbol, Vars*> rule_vars_;
- vector<shared_ptr<Rule>> rules_;
+ vector<const Rule*> rules_;
unordered_map<Symbol, bool> exports_;
Rule* last_rule_;