Skip to content

Commit

Permalink
src: remove SetEncoding from StringEncoder
Browse files Browse the repository at this point in the history
PR-URL: nodejs#53441
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
  • Loading branch information
anonrig authored and eliphazbouye committed Jun 20, 2024
1 parent 4e6acdf commit 0b2bb90
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/string_decoder-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<enum encoding>(state_[kEncodingField]);
}
Expand Down
1 change: 0 additions & 1 deletion src/string_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0b2bb90

Please sign in to comment.