diff --git a/core/error_context/analytics.hxx b/core/error_context/analytics.hxx index b535c6e5a..cd4dc870d 100644 --- a/core/error_context/analytics.hxx +++ b/core/error_context/analytics.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/core/error_context/http.hxx b/core/error_context/http.hxx index 508508ddc..99a45bcd0 100644 --- a/core/error_context/http.hxx +++ b/core/error_context/http.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/core/error_context/query.hxx b/core/error_context/query.hxx index afd9f75c0..26c957594 100644 --- a/core/error_context/query.hxx +++ b/core/error_context/query.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/core/error_context/search.hxx b/core/error_context/search.hxx index 5c1da73a5..15cf49f56 100644 --- a/core/error_context/search.hxx +++ b/core/error_context/search.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/core/error_context/view.hxx b/core/error_context/view.hxx index 5bd7a89f5..061176717 100644 --- a/core/error_context/view.hxx +++ b/core/error_context/view.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/core/impl/subdoc/lookup_in_macro.cxx b/core/impl/subdoc/lookup_in_macro.cxx index ae487ee24..a0152cf24 100644 --- a/core/impl/subdoc/lookup_in_macro.cxx +++ b/core/impl/subdoc/lookup_in_macro.cxx @@ -18,6 +18,7 @@ #include #include +#include #include namespace couchbase::subdoc diff --git a/core/impl/subdoc/mutate_in_macro.cxx b/core/impl/subdoc/mutate_in_macro.cxx index dc201d57f..60a6b2112 100644 --- a/core/impl/subdoc/mutate_in_macro.cxx +++ b/core/impl/subdoc/mutate_in_macro.cxx @@ -18,6 +18,7 @@ #include #include +#include #include namespace couchbase::subdoc diff --git a/core/operations/management/analytics_problem.hxx b/core/operations/management/analytics_problem.hxx index f6e08532f..6774fe1e4 100644 --- a/core/operations/management/analytics_problem.hxx +++ b/core/operations/management/analytics_problem.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #pragma once +#include #include namespace couchbase::core::operations::management diff --git a/core/operations/management/eventing_problem.hxx b/core/operations/management/eventing_problem.hxx index e6471d876..eb9311235 100644 --- a/core/operations/management/eventing_problem.hxx +++ b/core/operations/management/eventing_problem.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #pragma once +#include #include namespace couchbase::core::operations::management diff --git a/core/platform/base64.cc b/core/platform/base64.cc index 80032ae29..327f6334e 100644 --- a/core/platform/base64.cc +++ b/core/platform/base64.cc @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2016 Couchbase, Inc. + * Copyright 2016-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/core/protocol/client_opcode.hxx b/core/protocol/client_opcode.hxx index eb770d3a2..301d55e5b 100644 --- a/core/protocol/client_opcode.hxx +++ b/core/protocol/client_opcode.hxx @@ -17,6 +17,7 @@ #pragma once +#include #include #include diff --git a/core/protocol/cmd_info.hxx b/core/protocol/cmd_info.hxx index 1d2a98881..692e71c31 100644 --- a/core/protocol/cmd_info.hxx +++ b/core/protocol/cmd_info.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #pragma once +#include #include namespace couchbase::core::protocol diff --git a/core/transactions/atr_ids.cxx b/core/transactions/atr_ids.cxx index dfa3cc19c..fec4007a5 100644 --- a/core/transactions/atr_ids.cxx +++ b/core/transactions/atr_ids.cxx @@ -218,7 +218,7 @@ std::size_t atr_ids::vbucket_for_key(const std::string& key) { static const int num_vbuckets = 1024; - uint32_t digest = core::utils::hash_crc32(key.data(), key.size()); + std::uint32_t digest = core::utils::hash_crc32(key.data(), key.size()); return static_cast(digest % num_vbuckets); } diff --git a/core/utils/crc32.hxx b/core/utils/crc32.hxx index 90357b572..a95b90d37 100644 --- a/core/utils/crc32.hxx +++ b/core/utils/crc32.hxx @@ -5,6 +5,8 @@ * src/usr.bin/cksum/crc32.c. */ +#include + namespace couchbase::core::utils { static const std::uint32_t crc32tab[256] = { @@ -37,10 +39,9 @@ static const std::uint32_t crc32tab[256] = { static inline std::uint32_t hash_crc32(const char* key, size_t key_length) { - std::uint64_t x; std::uint32_t crc = UINT32_MAX; - for (x = 0; x < key_length; x++) { + for (std::uint64_t x = 0; x < key_length; x++) { crc = (crc >> 8) ^ crc32tab[(crc ^ static_cast(key[x])) & 0xff]; } diff --git a/core/utils/json_streaming_lexer.hxx b/core/utils/json_streaming_lexer.hxx index 68012fbf3..7f293dab4 100644 --- a/core/utils/json_streaming_lexer.hxx +++ b/core/utils/json_streaming_lexer.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include +#include #include #include #include diff --git a/core/utils/url_codec.cxx b/core/utils/url_codec.cxx index 635a97fff..bf9f3795b 100644 --- a/core/utils/url_codec.cxx +++ b/core/utils/url_codec.cxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include #include +#include namespace couchbase::core::utils::string_codec { diff --git a/test/utils/integration_shortcuts.hxx b/test/utils/integration_shortcuts.hxx index 11d2ef183..940d334e9 100644 --- a/test/utils/integration_shortcuts.hxx +++ b/test/utils/integration_shortcuts.hxx @@ -1,6 +1,6 @@ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* - * Copyright 2020-2021 Couchbase, Inc. + * Copyright 2020-Present Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ execute(std::shared_ptr cluster, Request request) auto barrier = std::make_shared>(); auto f = barrier->get_future(); cluster->execute(request, [barrier](response_type resp) { barrier->set_value(std::move(resp)); }); - return std::move(f.get()); + return f.get(); } void @@ -43,4 +43,4 @@ open_bucket(std::shared_ptr cluster, const std::string void close_bucket(std::shared_ptr cluster, const std::string& bucket_name); -} // namespace test::utils \ No newline at end of file +} // namespace test::utils