소스 검색

Changed not to use string_view

yhirose 5 년 전
부모
커밋
c9a13d214b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      httplib.h

+ 2 - 2
httplib.h

@@ -2142,8 +2142,8 @@ inline constexpr unsigned int str2tag_core(const char *s, size_t l,
                                  (h * 33) ^ static_cast<unsigned char>(*s));
 }
 
-inline constexpr unsigned int str2tag(std::string_view sv) {
-  return str2tag_core(sv.data(), sv.size(), 0);
+inline constexpr unsigned int str2tag(const std::string &s) {
+  return str2tag_core(s.data(), s.size(), 0);
 }
 
 namespace udl {