diff options
Diffstat (limited to 'src/symtab.h')
-rw-r--r-- | src/symtab.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/symtab.h b/src/symtab.h index f3524ca..137b8ef 100644 --- a/src/symtab.h +++ b/src/symtab.h @@ -22,9 +22,7 @@ #include "string_piece.h" -using namespace std; - -extern vector<string*>* g_symbols; +extern std::vector<std::string*>* g_symbols; class Symtab; class Var; @@ -33,7 +31,7 @@ class Symbol { public: explicit Symbol() : v_(-1) {} - const string& str() const { return *((*g_symbols)[v_]); } + const std::string& str() const { return *((*g_symbols)[v_]); } const char* c_str() const { return str().c_str(); } @@ -42,7 +40,7 @@ class Symbol { int val() const { return v_; } char get(size_t i) const { - const string& s = str(); + const std::string& s = str(); if (i >= s.size()) return 0; return s[i]; @@ -223,9 +221,10 @@ extern Symbol kKatiReadonlySym; Symbol Intern(StringPiece s); -string JoinSymbols(const vector<Symbol>& syms, const char* sep); +std::string JoinSymbols(const std::vector<Symbol>& syms, const char* sep); // Get all symbol names for which filter returns true. -vector<StringPiece> GetSymbolNames(std::function<bool(Var*)> const& filter); +std::vector<StringPiece> GetSymbolNames( + std::function<bool(Var*)> const& filter); #endif // SYMTAB_H_ |