From 0c6611a835d75718ae060b8b634ce47c85d7690b Mon Sep 17 00:00:00 2001 From: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Date: Fri, 13 Sep 2024 15:38:33 +0530 Subject: [PATCH] chore: use iwyu on hashing/**.cpp --- hashing/chaining.cpp | 9 +++++---- hashing/double_hash_hash_table.cpp | 7 ++++--- hashing/linear_probing_hash_table.cpp | 6 ++++-- hashing/quadratic_probing_hash_table.cpp | 8 +++++--- hashing/sha256.cpp | 19 +++++++++++-------- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/hashing/chaining.cpp b/hashing/chaining.cpp index 9c5a2a076..cf7a4dced 100644 --- a/hashing/chaining.cpp +++ b/hashing/chaining.cpp @@ -5,10 +5,11 @@ * @brief Implementation of [hash * chains](https://en.wikipedia.org/wiki/Hash_chain). */ -#include -#include -#include -#include +#include // for abs +#include // for abs +#include // for basic_ostream, operator<<, char_traits, cout +#include // for shared_ptr, __shared_ptr_access +#include // for vector /** * @brief Chain class with a given modulus diff --git a/hashing/double_hash_hash_table.cpp b/hashing/double_hash_hash_table.cpp index f5d803ba2..221b9fcdb 100644 --- a/hashing/double_hash_hash_table.cpp +++ b/hashing/double_hash_hash_table.cpp @@ -6,9 +6,10 @@ * keys](https://en.wikipedia.org/wiki/Double_hashing). * @note The implementation can be optimized by using OOP style. */ -#include -#include -#include +#include // for size_t +#include // for hash +#include // for basic_ostream, operator<<, char_traits, cout +#include // for vector /** * @addtogroup open_addressing Open Addressing diff --git a/hashing/linear_probing_hash_table.cpp b/hashing/linear_probing_hash_table.cpp index d87cb9cf7..01c732bb6 100644 --- a/hashing/linear_probing_hash_table.cpp +++ b/hashing/linear_probing_hash_table.cpp @@ -6,8 +6,10 @@ * hash](https://en.wikipedia.org/wiki/Linear_probing) keys. * @note The implementation can be optimized by using OOP style. */ -#include -#include +#include // for size_t +#include // for hash +#include // for basic_ostream, operator<<, char_traits, cout +#include // for vector /** * @addtogroup open_addressing Open Addressing diff --git a/hashing/quadratic_probing_hash_table.cpp b/hashing/quadratic_probing_hash_table.cpp index 258c009d0..add1d38fa 100644 --- a/hashing/quadratic_probing_hash_table.cpp +++ b/hashing/quadratic_probing_hash_table.cpp @@ -6,9 +6,11 @@ * hash](https://en.wikipedia.org/wiki/Quadratic_probing) keys. * @note The implementation can be optimized by using OOP style. */ -#include -#include -#include +#include // for round, pow +#include // for size_t +#include // for hash +#include // for basic_ostream, operator<<, char_traits, cout +#include // for vector /** * @addtogroup open_addressing Open Addressing diff --git a/hashing/sha256.cpp b/hashing/sha256.cpp index 0eae0bd36..202e58275 100644 --- a/hashing/sha256.cpp +++ b/hashing/sha256.cpp @@ -12,14 +12,17 @@ * used for authenticating software packages and secure password hashing. */ -#include /// For std::array -#include /// For assert -#include /// For uint8_t, uint32_t and uint64_t data types -#include /// For std::setfill and std::setw -#include /// For IO operations -#include /// For std::stringstream -#include /// For std::move -#include /// For std::vector +#include // for array +#include // for assert +#include // for uint32_t, uint8_t +#include // for operator<<, setfill, setw, _Setfill, _Setw +#include // for char_traits, basic_ostream, operator<<, cout, hex +#include // for basic_stringstream +#include // for move +#include // for allocator, vector +#include // for size_t +#include // for out_of_range +#include // for basic_string, string, operator== /** * @namespace hashing