From d3f73235b09d2e4ad9f0ead873aa6690e9240303 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 13 Jun 2024 09:37:27 -0400 Subject: [PATCH] src: remove `SetEncoding` from StringEncoder --- src/string_decoder-inl.h | 6 ------ src/string_decoder.h | 1 - 2 files changed, 7 deletions(-) diff --git a/src/string_decoder-inl.h b/src/string_decoder-inl.h index e7c0abb51546a7..5b18a27ec56f12 100644 --- a/src/string_decoder-inl.h +++ b/src/string_decoder-inl.h @@ -7,12 +7,6 @@ namespace node { -void StringDecoder::SetEncoding(enum encoding encoding) { - state_[kBufferedBytes] = 0; - state_[kMissingBytes] = 0; - state_[kEncodingField] = encoding; -} - enum encoding StringDecoder::Encoding() const { return static_cast(state_[kEncodingField]); } diff --git a/src/string_decoder.h b/src/string_decoder.h index 9059eeaa9d2eb7..ced3482ef2347f 100644 --- a/src/string_decoder.h +++ b/src/string_decoder.h @@ -10,7 +10,6 @@ namespace node { class StringDecoder { public: StringDecoder() { state_[kEncodingField] = BUFFER; } - inline void SetEncoding(enum encoding encoding); inline enum encoding Encoding() const; inline char* IncompleteCharacterBuffer();