aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-16 22:08:40 +0800
committerchriseth <c@ethdev.com>2015-06-16 22:09:20 +0800
commit66a85f0229c8160ab9d1dd3d96ba248afe1cab6e (patch)
tree877940c0084f673773e7786349c7850998d7f3a4
parent64a1e82b6cf6ef6483a159743827c68e7baa3a64 (diff)
downloaddexon-solidity-66a85f0229c8160ab9d1dd3d96ba248afe1cab6e.tar.gz
dexon-solidity-66a85f0229c8160ab9d1dd3d96ba248afe1cab6e.tar.zst
dexon-solidity-66a85f0229c8160ab9d1dd3d96ba248afe1cab6e.zip
Some documentation and checks for vector_ref.
-rw-r--r--Assembly.cpp10
-rw-r--r--AssemblyItem.cpp7
-rw-r--r--AssemblyItem.h9
3 files changed, 6 insertions, 20 deletions
diff --git a/Assembly.cpp b/Assembly.cpp
index 3557fc0e..34ee0596 100644
--- a/Assembly.cpp
+++ b/Assembly.cpp
@@ -292,16 +292,6 @@ void Assembly::injectStart(AssemblyItem const& _i)
m_items.insert(m_items.begin(), _i);
}
-inline bool matches(AssemblyItemsConstRef _a, AssemblyItemsConstRef _b)
-{
- if (_a.size() != _b.size())
- return false;
- for (unsigned i = 0; i < _a.size(); ++i)
- if (!_a[i].match(_b[i]))
- return false;
- return true;
-}
-
struct OptimiserChannel: public LogChannel { static const char* name() { return "OPT"; } static const int verbosity = 12; };
#define copt dev::LogOutputStream<OptimiserChannel, true>()
diff --git a/AssemblyItem.cpp b/AssemblyItem.cpp
index a4485a14..a0c5e19a 100644
--- a/AssemblyItem.cpp
+++ b/AssemblyItem.cpp
@@ -126,10 +126,3 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItem const& _item)
}
return _out;
}
-
-ostream& dev::eth::operator<<(ostream& _out, AssemblyItemsConstRef _i)
-{
- for (AssemblyItem const& i: _i)
- _out << i;
- return _out;
-}
diff --git a/AssemblyItem.h b/AssemblyItem.h
index 9eca0a7d..3fa9bb20 100644
--- a/AssemblyItem.h
+++ b/AssemblyItem.h
@@ -98,11 +98,14 @@ private:
};
using AssemblyItems = std::vector<AssemblyItem>;
-using AssemblyItemsConstRef = vector_ref<AssemblyItem const>;
std::ostream& operator<<(std::ostream& _out, AssemblyItem const& _item);
-std::ostream& operator<<(std::ostream& _out, AssemblyItemsConstRef _i);
-inline std::ostream& operator<<(std::ostream& _out, AssemblyItems const& _i) { return operator<<(_out, AssemblyItemsConstRef(&_i)); }
+inline std::ostream& operator<<(std::ostream& _out, AssemblyItems const& _items)
+{
+ for (AssemblyItem const& item: _items)
+ _out << item;
+ return _out;
+}
}
}