summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorElliott Hughes2017-12-01 10:51:24 -0600
committerandroid-build-merger2017-12-01 10:51:24 -0600
commit152d7e0f6c7e2b948d3538c50030226d53974ab9 (patch)
tree716f1a32e75849800b57d6c0c4c71fdfeb402eb5 /liblog
parentb32552496cae21742d503b8c6573a30871cfc87a (diff)
parentc8022a3efce555075e0be5897ddcdd9d0c29a880 (diff)
downloadplatform-system-core-152d7e0f6c7e2b948d3538c50030226d53974ab9.tar.gz
platform-system-core-152d7e0f6c7e2b948d3538c50030226d53974ab9.tar.xz
platform-system-core-152d7e0f6c7e2b948d3538c50030226d53974ab9.zip
Merge "std::string_view is no longer experimental."
am: c8022a3efc Change-Id: I75fa251cb6a959e7dfd32524b8d0ffcf839c3dc4
Diffstat (limited to 'liblog')
-rw-r--r--liblog/event_tag_map.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/liblog/event_tag_map.cpp b/liblog/event_tag_map.cpp
index 83064fde3..2e2bf8734 100644
--- a/liblog/event_tag_map.cpp
+++ b/liblog/event_tag_map.cpp
@@ -25,9 +25,9 @@
25#include <string.h> 25#include <string.h>
26#include <sys/mman.h> 26#include <sys/mman.h>
27 27
28#include <experimental/string_view>
29#include <functional> 28#include <functional>
30#include <string> 29#include <string>
30#include <string_view>
31#include <unordered_map> 31#include <unordered_map>
32 32
33#include <log/event_tag_map.h> 33#include <log/event_tag_map.h>
@@ -44,10 +44,10 @@
44class MapString { 44class MapString {
45 private: 45 private:
46 const std::string* alloc; // HAS-AN 46 const std::string* alloc; // HAS-AN
47 const std::experimental::string_view str; // HAS-A 47 const std::string_view str; // HAS-A
48 48
49 public: 49 public:
50 operator const std::experimental::string_view() const { 50 operator const std::string_view() const {
51 return str; 51 return str;
52 } 52 }
53 53
@@ -92,8 +92,7 @@ struct std::hash<MapString>
92 : public std::unary_function<const MapString&, size_t> { 92 : public std::unary_function<const MapString&, size_t> {
93 size_t operator()(const MapString& __t) const noexcept { 93 size_t operator()(const MapString& __t) const noexcept {
94 if (!__t.length()) return 0; 94 if (!__t.length()) return 0;
95 return std::hash<std::experimental::string_view>()( 95 return std::hash<std::string_view>()(std::string_view(__t));
96 std::experimental::string_view(__t));
97 } 96 }
98}; 97};
99 98