Skip to content

Commit

Permalink
All headers at the top (mamba-org#2658)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv authored and cvanelteren committed Jul 31, 2023
1 parent 7337d2d commit c4fbb2a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 45 deletions.
6 changes: 1 addition & 5 deletions libmamba/include/mamba/core/solution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef MAMBA_CORE_SOLUTION_HPP
#define MAMBA_CORE_SOLUTION_HPP

#include <type_traits>
#include <variant>
#include <vector>

Expand Down Expand Up @@ -80,12 +81,7 @@ namespace mamba
void for_each_to_omit(Iter first, Iter last, UnaryFunc&& func);
template <typename Range, typename UnaryFunc>
void for_each_to_omit(Range&& actions, UnaryFunc&& func);
}

#include <type_traits>

namespace mamba
{
/********************************
* Implementation of Solution *
********************************/
Expand Down
24 changes: 7 additions & 17 deletions libmamba/src/solv-cpp/pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@

#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>

#include <solv/pool.h>

#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
{
/**
Expand Down Expand Up @@ -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 <stdexcept>
#include <type_traits>

#include <solv/pool.h>

namespace mamba::solv
{
/*******************************
* Implementation of ObjPool *
*******************************/

template <typename UnaryFunc>
void ObjPool::for_each_repo_id(UnaryFunc&& func) const
Expand Down
15 changes: 3 additions & 12 deletions libmamba/src/solv-cpp/repo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@

#include <optional>
#include <string_view>
#include <type_traits>
#include <utility>

#include <solv/repo.h>

#include "solv-cpp/ids.hpp"
#include "solv-cpp/solvable.hpp"

extern "C"
{
using Repo = struct s_Repo;
}

namespace fs
{
class u8path;
Expand Down Expand Up @@ -266,14 +264,7 @@ namespace mamba::solv
*/
void internalize();
};
}

#include <type_traits>

#include <solv/repo.h>

namespace mamba::solv
{
/****************************************
* Implementation of ObjRepoViewConst *
****************************************/
Expand Down
17 changes: 6 additions & 11 deletions libmamba/src/solv-cpp/transaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
#include <optional>
#include <utility>

#include <solv/transaction.h>

#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;
Expand Down Expand Up @@ -142,14 +140,11 @@ namespace mamba::solv
TransactionMode mode = 0
) const -> ObjQueue;
};
}

#include <solv/transaction.h>

#include "solv-cpp/pool.hpp"
/**************************************
* Implementation of ObjTransaction *
**************************************/

namespace mamba::solv
{
template <typename UnaryFunc>
void ObjTransaction::for_each_step_id(UnaryFunc&& func) const
{
Expand Down

0 comments on commit c4fbb2a

Please sign in to comment.