Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
quic: fix clang build
Browse files Browse the repository at this point in the history
It seems that clang doesn't implicitly convert "unsigned long"
into "unsigned long long" for function templates.

PR-URL: #352
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
oyyd authored and jasnell committed Feb 24, 2020
1 parent 368e339 commit b67b419
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/quic/node_quic_http3_application.cc
Expand Up @@ -105,10 +105,10 @@ void Http3Header::MemoryInfo(MemoryTracker* tracker) const {
tracker->TrackField("value", value_);
}

template <typename T>
template <typename M, typename T>
void Http3Application::SetConfig(
int idx,
uint64_t T::*member) {
M T::*member) {
AliasedFloat64Array& buffer = env()->quic_state()->http3config_buffer;
uint64_t flags = static_cast<uint64_t>(buffer[IDX_HTTP3_CONFIG_COUNT]);
if (flags & (1ULL << idx))
Expand All @@ -120,9 +120,9 @@ Http3Application::Http3Application(
: QuicApplication(session),
alloc_info_(MakeAllocator()) {
// Collect Configuration Details.
SetConfig(IDX_HTTP3_QPACK_MAX_TABLE_CAPACITY,
SetConfig<size_t>(IDX_HTTP3_QPACK_MAX_TABLE_CAPACITY,
&Http3ApplicationConfig::qpack_max_table_capacity);
SetConfig(IDX_HTTP3_QPACK_BLOCKED_STREAMS,
SetConfig<size_t>(IDX_HTTP3_QPACK_BLOCKED_STREAMS,
&Http3ApplicationConfig::qpack_blocked_streams);
SetConfig(IDX_HTTP3_MAX_HEADER_LIST_SIZE,
&Http3ApplicationConfig::max_header_list_size);
Expand Down
4 changes: 2 additions & 2 deletions src/quic/node_quic_http3_application.h
Expand Up @@ -173,8 +173,8 @@ class Http3Application final :
void MemoryInfo(MemoryTracker* tracker) const override;

private:
template <typename T>
void SetConfig(int idx, uint64_t T::*member);
template <typename M = uint64_t, typename T>
void SetConfig(int idx, M T::*member);

nghttp3_conn* connection() const { return connection_.get(); }
BaseObjectPtr<QuicStream> FindOrCreateStream(int64_t stream_id);
Expand Down

0 comments on commit b67b419

Please sign in to comment.