GCC Code Coverage Report
Directory: ../ Exec Total Coverage
File: /home/iojs/build/workspace/node-test-commit-linux-coverage-daily/nodes/benchmark/out/../src/string_decoder-inl.h Lines: 8 8 100.0 %
Date: 2019-09-12 22:30:12 Branches: 0 0 - %

Line Branch Exec Source
1
#ifndef SRC_STRING_DECODER_INL_H_
2
#define SRC_STRING_DECODER_INL_H_
3
4
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
5
6
#include "string_decoder.h"
7
#include "util.h"
8
9
namespace node {
10
11
void StringDecoder::SetEncoding(enum encoding encoding) {
12
  state_[kBufferedBytes] = 0;
13
  state_[kMissingBytes] = 0;
14
  state_[kEncodingField] = encoding;
15
}
16
17
417249
enum encoding StringDecoder::Encoding() const {
18
417249
  return static_cast<enum encoding>(state_[kEncodingField]);
19
}
20
21
100547
unsigned StringDecoder::BufferedBytes() const {
22
100547
  return state_[kBufferedBytes];
23
}
24
25
91899
unsigned StringDecoder::MissingBytes() const {
26
91899
  return state_[kMissingBytes];
27
}
28
29
9868
char* StringDecoder::IncompleteCharacterBuffer() {
30
9868
  return reinterpret_cast<char*>(state_ + kIncompleteCharactersStart);
31
}
32
33
34
}  // namespace node
35
36
#endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
37
38
#endif   // SRC_STRING_DECODER_INL_H_