From 840e011b75fb77f761f288a75b4b2a86358dcb9e Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Tue, 23 May 2023 20:55:24 -0700 Subject: [PATCH] buf_ref.into() can be const now --- gpt4all-backend/tokenizer/bpe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-backend/tokenizer/bpe.h b/gpt4all-backend/tokenizer/bpe.h index 3e43dd22..e53c1323 100644 --- a/gpt4all-backend/tokenizer/bpe.h +++ b/gpt4all-backend/tokenizer/bpe.h @@ -88,7 +88,7 @@ struct buf_ref { uint32_t offset : 20; uint32_t length : 12; - std::string_view into(const char* buf) { + std::string_view into(const char* buf) const { return std::string_view(&buf[offset], length); } };