Skip to content

Commit c986850

Browse files
danbevkjin
authored andcommitted
http2: rename http2_state class to Http2State
This commit renames the http2_state class to follow the guidelines in CPP_STYLE_GUIDE.md. PR-URL: nodejs#20423 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 27a337a commit c986850

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/env-inl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,12 @@ inline void Environment::set_http_parser_buffer(char* buffer) {
417417
http_parser_buffer_ = buffer;
418418
}
419419

420-
inline http2::http2_state* Environment::http2_state() const {
420+
inline http2::Http2State* Environment::http2_state() const {
421421
return http2_state_.get();
422422
}
423423

424424
inline void Environment::set_http2_state(
425-
std::unique_ptr<http2::http2_state> buffer) {
425+
std::unique_ptr<http2::Http2State> buffer) {
426426
CHECK(!http2_state_); // Should be set only once.
427427
http2_state_ = std::move(buffer);
428428
}

src/env.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ class Environment {
616616
inline char* http_parser_buffer() const;
617617
inline void set_http_parser_buffer(char* buffer);
618618

619-
inline http2::http2_state* http2_state() const;
620-
inline void set_http2_state(std::unique_ptr<http2::http2_state> state);
619+
inline http2::Http2State* http2_state() const;
620+
inline void set_http2_state(std::unique_ptr<http2::Http2State> state);
621621

622622
inline double* fs_stats_field_array() const;
623623
inline void set_fs_stats_field_array(double* fields);
@@ -754,7 +754,7 @@ class Environment {
754754
double* heap_space_statistics_buffer_ = nullptr;
755755

756756
char* http_parser_buffer_;
757-
std::unique_ptr<http2::http2_state> http2_state_;
757+
std::unique_ptr<http2::Http2State> http2_state_;
758758

759759
double* fs_stats_field_array_;
760760

src/node_http2.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,7 @@ void Initialize(Local<Object> target,
28682868
Isolate* isolate = env->isolate();
28692869
HandleScope scope(isolate);
28702870

2871-
std::unique_ptr<http2_state> state(new http2_state(isolate));
2871+
std::unique_ptr<Http2State> state(new Http2State(isolate));
28722872

28732873
#define SET_STATE_TYPEDARRAY(name, field) \
28742874
target->Set(context, \

src/node_http2_state.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ namespace http2 {
8484
IDX_SESSION_STATS_COUNT
8585
};
8686

87-
class http2_state {
87+
class Http2State {
8888
public:
89-
explicit http2_state(v8::Isolate* isolate) :
89+
explicit Http2State(v8::Isolate* isolate) :
9090
root_buffer(
9191
isolate,
9292
sizeof(http2_state_internal)),

0 commit comments

Comments
 (0)