Skip to content

Commit

Permalink
http2: rename http2_state class to Http2State
Browse files Browse the repository at this point in the history
This commit renames the http2_state class to follow the guidelines in
CPP_STYLE_GUIDE.md.

Backport-PR-URL: #22850
PR-URL: #20423
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
danbev authored and BethGriggs committed Oct 16, 2018
1 parent 74192dd commit 395ce84
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,12 @@ inline void Environment::set_http_parser_buffer(char* buffer) {
http_parser_buffer_ = buffer;
}

inline http2::http2_state* Environment::http2_state() const {
inline http2::Http2State* Environment::http2_state() const {
return http2_state_.get();
}

inline void Environment::set_http2_state(
std::unique_ptr<http2::http2_state> buffer) {
std::unique_ptr<http2::Http2State> buffer) {
CHECK(!http2_state_); // Should be set only once.
http2_state_ = std::move(buffer);
}
Expand Down
6 changes: 3 additions & 3 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ class Environment {
inline char* http_parser_buffer() const;
inline void set_http_parser_buffer(char* buffer);

inline http2::http2_state* http2_state() const;
inline void set_http2_state(std::unique_ptr<http2::http2_state> state);
inline http2::Http2State* http2_state() const;
inline void set_http2_state(std::unique_ptr<http2::Http2State> state);

inline double* fs_stats_field_array() const;
inline void set_fs_stats_field_array(double* fields);
Expand Down Expand Up @@ -759,7 +759,7 @@ class Environment {
double* heap_space_statistics_buffer_ = nullptr;

char* http_parser_buffer_;
std::unique_ptr<http2::http2_state> http2_state_;
std::unique_ptr<http2::Http2State> http2_state_;

double* fs_stats_field_array_;

Expand Down
2 changes: 1 addition & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2868,7 +2868,7 @@ void Initialize(Local<Object> target,
Isolate* isolate = env->isolate();
HandleScope scope(isolate);

std::unique_ptr<http2_state> state(new http2_state(isolate));
std::unique_ptr<Http2State> state(new Http2State(isolate));

#define SET_STATE_TYPEDARRAY(name, field) \
target->Set(context, \
Expand Down
4 changes: 2 additions & 2 deletions src/node_http2_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ namespace http2 {
IDX_SESSION_STATS_COUNT
};

class http2_state {
class Http2State {
public:
explicit http2_state(v8::Isolate* isolate) :
explicit Http2State(v8::Isolate* isolate) :
root_buffer(
isolate,
sizeof(http2_state_internal)),
Expand Down

0 comments on commit 395ce84

Please sign in to comment.