Skip to content

Commit

Permalink
Refactor include paths to use atom/macro.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroAir committed Oct 27, 2024
1 parent 4ef1173 commit 7f3402d
Show file tree
Hide file tree
Showing 125 changed files with 1,368 additions and 525 deletions.
2 changes: 1 addition & 1 deletion libs
Submodule libs updated 117 files
2 changes: 1 addition & 1 deletion modules/atom.system/_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Description: Component of Atom-System

#include "command.hpp"
#include "crash.hpp"
#include "macro.hpp"
#include "atom/macro.hpp"
#include "pidwatcher.hpp"
#include "platform.hpp"
#include "user.hpp"
Expand Down
2 changes: 1 addition & 1 deletion modules/atom.system/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Description: Main Entry
**************************************************/

#include "_component.hpp"
#include "macro.hpp"
#include "atom/macro.hpp"

#include "atom/type/json.hpp"
using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Description: Main Entry
#include "_component.hpp"

#include "atom/type/json.hpp"
#include "macro.hpp"
#include "atom/macro.hpp"
using json = nlohmann::json;

ATOM_C {
Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/src/pci_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Description: PCI info generator
#include "atom/error/exception.hpp"
#include "atom/log/loguru.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

namespace fs = std::filesystem;

Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/src/symbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "atom/function/abi.hpp"
#include "atom/log/loguru.hpp"
#include "atom/type/json.hpp"
#include "macro.hpp"
#include "atom/macro.hpp"
#include "yaml-cpp/yaml.h"

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/tests/ini2json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <gtest/gtest.h>
#include <fstream>
#include "macro.hpp"
#include "atom/macro.hpp"

using namespace lithium::cxxtools;

Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/tests/json2ini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <gtest/gtest.h>
#include <fstream>
#include "macro.hpp"
#include "atom/macro.hpp"

using namespace lithium::cxxtools;

Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.image/include/solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <libstellarsolver/stellarsolver.h>
#include <cstdint>

#include "macro.hpp"
#include "atom/macro.hpp"

struct LoadFitsResult {
bool success{};
Expand Down
2 changes: 1 addition & 1 deletion modules/lithium.indiserver/include/driverlist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <string>
#include <vector>

#include "macro.hpp"
#include "atom/macro.hpp"

struct Device {
std::string label;
Expand Down
2 changes: 1 addition & 1 deletion src/LithiumApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Description: Lithium App Enter
#include "atom/type/json_fwd.hpp"
#include "atom/type/message.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

using json = nlohmann::json;
namespace fs = std::filesystem;
Expand Down
2 changes: 1 addition & 1 deletion src/addon/analysts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "atom/type/json_fwd.hpp"
using json = nlohmann::json;

#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {

Expand Down
2 changes: 1 addition & 1 deletion src/addon/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "atom/type/json.hpp"
using json = nlohmann::json;

#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {
struct CompileCommand {
Expand Down
2 changes: 1 addition & 1 deletion src/addon/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <string>
#include <string_view>
#include <vector>
#include "macro.hpp"
#include "atom/macro.hpp"

#include "atom/type/json_fwd.hpp"
using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion src/addon/debug/elf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <string>
#include <vector>

#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {

Expand Down
2 changes: 1 addition & 1 deletion src/addon/debug/pdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>
#include <vector>

#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {

Expand Down
2 changes: 1 addition & 1 deletion src/addon/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "utils/constant.hpp"
#include "utils/marco.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

#if defined(_WIN32) || defined(_WIN64)
// clang-format off
Expand Down
2 changes: 1 addition & 1 deletion src/addon/module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Description: Module Information
#include <vector>

#include "atom/function/ffi.hpp"
#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {
struct FunctionInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/addon/platform/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <string>
#include <vector>

#include "atom/macro.hpp"
#include "atom/atom/macro.hpp"

namespace lithium {

Expand Down
2 changes: 1 addition & 1 deletion src/addon/project/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <string>
#include <vector>

#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {

Expand Down
2 changes: 1 addition & 1 deletion src/addon/template/standalone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <span>
#include <thread>

#include "macro.hpp"
#include "atom/macro.hpp"

#if defined(_WIN32) || defined(_WIN64)
#include <fcntl.h>
Expand Down
2 changes: 1 addition & 1 deletion src/addon/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "atom/error/exception.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

namespace lithium {

Expand Down
2 changes: 1 addition & 1 deletion src/app/counter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string_view>
#include <vector>

#include "macro.hpp"
#include "atom/macro.hpp"

/**
* @brief Macro to count and time a function call.
Expand Down
2 changes: 1 addition & 1 deletion src/atom/algorithm/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description: A collection of algorithms for C++

#include "atom/type/static_string.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

namespace atom::algorithm {
namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion src/atom/algorithm/bignumber.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <string>

#include "macro.hpp"
#include "atom/macro.hpp"

namespace atom::algorithm {

Expand Down
7 changes: 7 additions & 0 deletions src/atom/algorithm/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Description: A collection of hash algorithms
#ifndef ATOM_ALGORITHM_HASH_HPP
#define ATOM_ALGORITHM_HASH_HPP

#include <any>
#include <array>
#include <functional>
#include <tuple>
Expand Down Expand Up @@ -101,6 +102,12 @@ auto computeHash(const std::array<T, N>& array) -> std::size_t {
return result;
}

inline auto computeHash(const std::any& value) -> std::size_t {
if (value.has_value()) {
return value.type().hash_code();
}
return 0;
}
} // namespace atom::algorithm

/**
Expand Down
2 changes: 1 addition & 1 deletion src/atom/algorithm/mhash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Description: Implementation of murmur3 hash and quick hash
#include <CL/cl.h>
#endif

#include "macro.hpp"
#include "atom/macro.hpp"

namespace atom::algorithm {
constexpr size_t K_HASH_SIZE = 32;
Expand Down
2 changes: 1 addition & 1 deletion src/atom/async/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ still some problems on Windows, especially the console.
#include <ostream>
#include <sstream>
#include <thread>
#include "macro.hpp"
#include "atom/macro.hpp"

#ifndef _WIN32
#include <unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion src/atom/async/message_bus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Description: Main Message Bus with Asio support
#include <unordered_set>
#include <vector>

#include "atom/macro.hpp"
#include "atom/atom/macro.hpp"

namespace atom::async {

Expand Down
2 changes: 1 addition & 1 deletion src/atom/async/pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Description: A very simple thread pool for preload
#include <thread>
#include <type_traits>
#include <utility>
#include "macro.hpp"
#include "atom/macro.hpp"
#ifdef __has_include
#if __has_include(<version>)
#include <version>
Expand Down
2 changes: 1 addition & 1 deletion src/atom/components/component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description: Basic Component Definition
#include <vector>

#include "dispatch.hpp"
#include "module_macro.hpp"
#include "module_atom/macro.hpp"
#include "var.hpp"

#include "atom/function/concept.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/atom/components/dispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "atom/function/type_caster.hpp"
#include "atom/type/json.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion src/atom/components/var.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description: Variable Manager
#include <utility>
#include <vector>

#include "macro.hpp"
#include "atom/macro.hpp"

#if ENABLE_FASTHASH
#include "emhash/hash_table8.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/atom/connection/sshserver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description: SSH Server

#include "atom/type/noncopyable.hpp"

#include "macro.hpp"
#include "atom/macro.hpp"

namespace atom::connection {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/atom/error/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Description: Better Exception Library
#include <string>
#include <thread>

#include "macro.hpp"
#include "atom/macro.hpp"
#include "stacktrace.hpp"

namespace atom::error {
Expand Down
2 changes: 1 addition & 1 deletion src/atom/extra/inicpp/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <string>
#include <string_view>

#include "macro.hpp"
#include "atom/macro.hpp"

namespace inicpp {

Expand Down
Loading

0 comments on commit 7f3402d

Please sign in to comment.