diff options
Diffstat (limited to 'external/zxing/assume.__cpp_lib_string_view.patch.0')
-rw-r--r-- | external/zxing/assume.__cpp_lib_string_view.patch.0 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/external/zxing/assume.__cpp_lib_string_view.patch.0 b/external/zxing/assume.__cpp_lib_string_view.patch.0 new file mode 100644 index 000000000000..24593aa56946 --- /dev/null +++ b/external/zxing/assume.__cpp_lib_string_view.patch.0 @@ -0,0 +1,25 @@ +--- ./core/src/ByteArray.h 2022-12-05 10:05:07.330193204 +0000 ++++ ./core/src/ByteArray.h 2022-12-05 10:05:13.897892011 +0000 +@@ -11,9 +11,7 @@ + #include <string> + #include <vector> + +-#ifdef __cpp_lib_string_view + #include <string_view> +-#endif + + namespace ZXing { + +@@ -30,12 +28,10 @@ + + void append(const ByteArray& other) { insert(end(), other.begin(), other.end()); } + +-#ifdef __cpp_lib_string_view + std::string_view asString(size_t pos = 0, size_t len = std::string_view::npos) const + { + return std::string_view(reinterpret_cast<const char*>(data()), size()).substr(pos, len); + } +-#endif + }; + + inline std::string ToHex(const ByteArray& bytes) |