summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorElliott Hughes2017-11-30 18:31:35 -0600
committerElliott Hughes2017-11-30 18:32:15 -0600
commite805883a2b088a187ce4339e04387efbeb35b512 (patch)
tree0a31d7e95a62086d1d60f40fe09803d5c2adb6de /liblog
parentaaa0bbce8eadf1a428493f3524066a74447eded4 (diff)
downloadplatform-system-core-e805883a2b088a187ce4339e04387efbeb35b512.tar.gz
platform-system-core-e805883a2b088a187ce4339e04387efbeb35b512.tar.xz
platform-system-core-e805883a2b088a187ce4339e04387efbeb35b512.zip
std::string_view is no longer experimental.
Bug: N/A Test: builds Change-Id: I8f022fdc3ebaebd8aa250414569485a752f98da7
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