summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/table.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-14 23:14:16 +0000
committerKarl Berry <karl@freefriends.org>2010-06-14 23:14:16 +0000
commitc2175edc7aa44ca0b526f008d473d6f8a8ac4933 (patch)
treed6c491676b413ad1922481f8c3fc7b64c3afc0a5 /Build/source/utils/asymptote/table.h
parent5d08e9ff4fe5fc836d237ea08e82c82b27d558a2 (diff)
asy 1.98
git-svn-id: svn://tug.org/texlive/trunk@18982 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/table.h')
-rw-r--r--Build/source/utils/asymptote/table.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Build/source/utils/asymptote/table.h b/Build/source/utils/asymptote/table.h
index cd8f26d2278..38427f90b06 100644
--- a/Build/source/utils/asymptote/table.h
+++ b/Build/source/utils/asymptote/table.h
@@ -25,23 +25,23 @@ std::ostream& operator<< (std::ostream& out, const table<B>& t);
template <class B>
class table {
protected:
- typedef mem::multimap<symbol*CONST,B> scope_t;
+ typedef mem::multimap<symbol CONST,B> scope_t;
typedef typename scope_t::iterator scope_iterator;
typedef mem::list<scope_t> scopes_t;
typedef mem::list<B> name_t;
typedef typename name_t::iterator name_iterator;
- typedef mem::map<symbol*CONST,name_t> names_t;
+ typedef mem::map<symbol CONST,name_t> names_t;
typedef typename names_t::iterator names_iterator;
scopes_t scopes;
names_t names;
- void remove(symbol *key);
+ void remove(symbol key);
public :
table();
- void enter(symbol *key, B value);
- B look(symbol *key);
+ void enter(symbol key, B value);
+ B look(symbol key);
// Allows scoping and overloading of symbols of the same name
void beginScope();
@@ -52,7 +52,7 @@ public :
void collapseScope();
// Adds to l, all names prefixed by start.
- void completions(mem::list<symbol *>& l, string start);
+ void completions(mem::list<symbol >& l, string start);
friend std::ostream& operator<< <B> (std::ostream& out, const table& t);
};
@@ -64,14 +64,14 @@ inline table<B>::table()
}
template <class B>
-inline void table<B>::enter(symbol *key, B value)
+inline void table<B>::enter(symbol key, B value)
{
scopes.front().insert(std::make_pair(key,value));
names[key].push_front(value);
}
template <class B>
-inline B table<B>::look(symbol *key)
+inline B table<B>::look(symbol key)
{
if (!names[key].empty())
return names[key].front();
@@ -85,7 +85,7 @@ inline void table<B>::beginScope()
}
template <class B>
-inline void table<B>::remove(symbol *key)
+inline void table<B>::remove(symbol key)
{
if (!names[key].empty())
names[key].pop_front();
@@ -115,10 +115,10 @@ inline bool prefix(string start, string name) {
}
template <class B>
-inline void table<B>::completions(mem::list<symbol *>& l, string start)
+inline void table<B>::completions(mem::list<symbol>& l, string start)
{
for (names_iterator p = names.begin(); p != names.end(); ++p)
- if (prefix(start, *(p->first)) && !p->second.empty())
+ if (prefix(start, p->first) && !p->second.empty())
l.push_back(p->first);
}