From 7c24c5d0de4d3584d6d2f9f3c26b4d757b0a0df2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 10 Oct 2018 07:59:51 +0200 Subject: Fix sibs test not including parent library correctly Refactor config parsing to reduce number of changes when introducing a new platform to support --- include/StringView.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/StringView.hpp') diff --git a/include/StringView.hpp b/include/StringView.hpp index adfa237..4d87d8a 100644 --- a/include/StringView.hpp +++ b/include/StringView.hpp @@ -7,6 +7,7 @@ #include "env.hpp" #include #include +#include namespace sibs { @@ -47,6 +48,12 @@ namespace sibs return XXH32(data, size, 0xdec05eba); #endif } + + char operator [] (size_t index) const + { + assert(index < size); + return data[index]; + } const char *data; usize size; -- cgit v1.2.3