From c4fbb2ac194b6a177d3b225b00b4ccf3322d3524 Mon Sep 17 00:00:00 2001 From: Antoine Prouvost Date: Wed, 19 Jul 2023 10:37:33 +0200 Subject: [PATCH] All headers at the top (#2658) --- libmamba/include/mamba/core/solution.hpp | 6 +----- libmamba/src/solv-cpp/pool.hpp | 24 +++++++----------------- libmamba/src/solv-cpp/repo.hpp | 15 +++------------ libmamba/src/solv-cpp/transaction.hpp | 17 ++++++----------- 4 files changed, 17 insertions(+), 45 deletions(-) diff --git a/libmamba/include/mamba/core/solution.hpp b/libmamba/include/mamba/core/solution.hpp index 327686f283..72800808f1 100644 --- a/libmamba/include/mamba/core/solution.hpp +++ b/libmamba/include/mamba/core/solution.hpp @@ -7,6 +7,7 @@ #ifndef MAMBA_CORE_SOLUTION_HPP #define MAMBA_CORE_SOLUTION_HPP +#include #include #include @@ -80,12 +81,7 @@ namespace mamba void for_each_to_omit(Iter first, Iter last, UnaryFunc&& func); template void for_each_to_omit(Range&& actions, UnaryFunc&& func); -} - -#include -namespace mamba -{ /******************************** * Implementation of Solution * ********************************/ diff --git a/libmamba/src/solv-cpp/pool.hpp b/libmamba/src/solv-cpp/pool.hpp index 4c9bf5e97c..75cdef7158 100644 --- a/libmamba/src/solv-cpp/pool.hpp +++ b/libmamba/src/solv-cpp/pool.hpp @@ -9,20 +9,19 @@ #include #include +#include #include #include +#include #include +#include + #include "solv-cpp/ids.hpp" #include "solv-cpp/queue.hpp" #include "solv-cpp/repo.hpp" #include "solv-cpp/solvable.hpp" -extern "C" -{ - using Pool = struct s_Pool; -} - namespace mamba::solv { /** @@ -269,19 +268,10 @@ namespace mamba::solv // Must be deleted before the debug callback std::unique_ptr<::Pool, ObjPool::PoolDeleter> m_pool = nullptr; }; -} -/******************************* - * Implementation of ObjPool * - *******************************/ - -#include -#include - -#include - -namespace mamba::solv -{ + /******************************* + * Implementation of ObjPool * + *******************************/ template void ObjPool::for_each_repo_id(UnaryFunc&& func) const diff --git a/libmamba/src/solv-cpp/repo.hpp b/libmamba/src/solv-cpp/repo.hpp index eb0067a402..8c6f510b34 100644 --- a/libmamba/src/solv-cpp/repo.hpp +++ b/libmamba/src/solv-cpp/repo.hpp @@ -9,16 +9,14 @@ #include #include +#include #include +#include + #include "solv-cpp/ids.hpp" #include "solv-cpp/solvable.hpp" -extern "C" -{ - using Repo = struct s_Repo; -} - namespace fs { class u8path; @@ -266,14 +264,7 @@ namespace mamba::solv */ void internalize(); }; -} -#include - -#include - -namespace mamba::solv -{ /**************************************** * Implementation of ObjRepoViewConst * ****************************************/ diff --git a/libmamba/src/solv-cpp/transaction.hpp b/libmamba/src/solv-cpp/transaction.hpp index 624c1dd87c..72d443dc3b 100644 --- a/libmamba/src/solv-cpp/transaction.hpp +++ b/libmamba/src/solv-cpp/transaction.hpp @@ -11,14 +11,12 @@ #include #include +#include + #include "solv-cpp/ids.hpp" +#include "solv-cpp/pool.hpp" #include "solv-cpp/queue.hpp" -extern "C" -{ - using Transaction = struct s_Transaction; -} - namespace mamba::solv { class ObjPool; @@ -142,14 +140,11 @@ namespace mamba::solv TransactionMode mode = 0 ) const -> ObjQueue; }; -} - -#include -#include "solv-cpp/pool.hpp" + /************************************** + * Implementation of ObjTransaction * + **************************************/ -namespace mamba::solv -{ template void ObjTransaction::for_each_step_id(UnaryFunc&& func) const {