aboutsummaryrefslogtreecommitdiff
path: root/include/olm/memory.hh
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-05-20 15:07:10 +0100
committerRichard van der Hoff <richard@matrix.org>2016-05-20 15:07:10 +0100
commitacae4e84386056e80eb4bb633fcdf03375c087ea (patch)
tree77a488d87eccbbd485cf19126a10082d00f377f1 /include/olm/memory.hh
parent9ac6ab0f1c8ca1467ef2e3b2c6e51922e08f3746 (diff)
Remove functions which return strings
We don't want anything which does dynamic memory allocation in the library.
Diffstat (limited to 'include/olm/memory.hh')
-rw-r--r--include/olm/memory.hh19
1 files changed, 0 insertions, 19 deletions
diff --git a/include/olm/memory.hh b/include/olm/memory.hh
index 89afd99..74ff9f8 100644
--- a/include/olm/memory.hh
+++ b/include/olm/memory.hh
@@ -87,23 +87,4 @@ std::uint8_t * store_array(
return destination + sizeof(T);
}
-/** convert an array of bytes to a string representation */
-template<typename T>
-std::string bytes_to_string(T start, T end) {
- std::ostringstream ss;
- ss << std::hex << std::setfill('0');
- while (start != end) {
- ss << std::setw(2) << static_cast<int>(*start++);
- if (start != end) {
- ss << ":";
- }
- }
- return ss.str();
-}
-
-template<typename T>
-std::string bytes_to_string(T start, size_t len) {
- return bytes_to_string(start, start+len);
-}
-
} // namespace olm