瀏覽代碼

2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Renamed member variables.
	* src/Option.cc
	* src/Option.h
Tatsuhiro Tsujikawa 15 年之前
父節點
當前提交
26faa70b3b
共有 3 個文件被更改,包括 19 次插入13 次删除
  1. 6 0
      ChangeLog
  2. 10 10
      src/Option.cc
  3. 3 3
      src/Option.h

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2010-06-12  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Renamed member variables.
+	* src/Option.cc
+	* src/Option.h
+
 2010-06-12  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Renamed member variables.

+ 10 - 10
src/Option.cc

@@ -45,23 +45,23 @@ Option::Option() {}
 Option::~Option() {}
 
 void Option::put(const std::string& name, const std::string& value) {
-  table[name] = value;
+  _table[name] = value;
 }
 
 bool Option::defined(const std::string& name) const
 {
-  return table.count(name) == 1;
+  return _table.count(name) == 1;
 }
 
 bool Option::blank(const std::string& name) const
 {
-  std::map<std::string, std::string>::const_iterator i = table.find(name);
-  return i == table.end() || (*i).second.empty();
+  std::map<std::string, std::string>::const_iterator i = _table.find(name);
+  return i == _table.end() || (*i).second.empty();
 }
 
 const std::string& Option::get(const std::string& name) const {
-  std::map<std::string, std::string>::const_iterator itr = table.find(name);
-  if(itr == table.end()) {
+  std::map<std::string, std::string>::const_iterator itr = _table.find(name);
+  if(itr == _table.end()) {
     return A2STR::NIL;
   } else {
     return (*itr).second;
@@ -101,15 +101,15 @@ double Option::getAsDouble(const std::string& name) const {
 
 void Option::remove(const std::string& name)
 {
-  std::map<std::string, std::string>::iterator i = table.find(name);
-  if(i != table.end()) {
-    table.erase(i);
+  std::map<std::string, std::string>::iterator i = _table.find(name);
+  if(i != _table.end()) {
+    _table.erase(i);
   }
 }
 
 void Option::clear()
 {
-  table.clear();
+  _table.clear();
 }
 
 } // namespace aria2

+ 3 - 3
src/Option.h

@@ -43,7 +43,7 @@ namespace aria2 {
 
 class Option {
 private:
-  std::map<std::string, std::string> table;
+  std::map<std::string, std::string> _table;
 public:
   Option();
   ~Option();
@@ -67,12 +67,12 @@ public:
 
   std::map<std::string, std::string>::const_iterator begin() const
   {
-    return table.begin();
+    return _table.begin();
   }
 
   std::map<std::string, std::string>::const_iterator end() const
   {
-    return table.end();
+    return _table.end();
   }
 };