sys: More compile time improvements
This commit is contained in:
parent
1ba185bf71
commit
633fa7213a
4
external/ImGui/include/imgui_memory_editor.h
vendored
4
external/ImGui/include/imgui_memory_editor.h
vendored
@ -46,8 +46,8 @@
|
||||
|
||||
#include <stdio.h> // sprintf, scanf
|
||||
#include <stdint.h> // uint8_t, etc.
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/api/event.hpp>
|
||||
|
||||
#include <string>
|
||||
@ -231,7 +231,7 @@ struct MemoryEditor
|
||||
if (ImGui::Begin(title, p_open, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNavInputs))
|
||||
{
|
||||
if (DataPreviewAddr != DataPreviewAddrOld || DataPreviewAddrEnd != DataPreviewAddrEndOld) {
|
||||
hex::Region selectionRegion = { std::min(DataPreviewAddr, DataPreviewAddrEnd) + base_display_addr, std::max(DataPreviewAddr, DataPreviewAddrEnd) - std::min(DataPreviewAddr, DataPreviewAddrEnd) };
|
||||
Region selectionRegion = { std::min(DataPreviewAddr, DataPreviewAddrEnd) + base_display_addr, std::max(DataPreviewAddr, DataPreviewAddrEnd) - std::min(DataPreviewAddr, DataPreviewAddrEnd) };
|
||||
hex::EventManager::post<hex::EventRegionSelected>(selectionRegion);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <hex/views/view.hpp>
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <string_view>
|
||||
#include <dlfcn.h>
|
||||
|
@ -5,8 +5,6 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/views/view.hpp>
|
||||
#include "helpers/encoding_file.hpp"
|
||||
|
||||
|
@ -5,11 +5,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/views/view.hpp>
|
||||
|
||||
#include <imgui_imhex_extensions.h>
|
||||
|
||||
struct GLFWwindow;
|
||||
struct ImGuiSettingsHandler;
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include "math_evaluator.hpp"
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <hex/helpers/crypto.hpp>
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <cctype>
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <hex/lang/ast_node.hpp>
|
||||
#include <hex/lang/log_console.hpp>
|
||||
#include <hex/lang/evaluator.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <hex/helpers/net.hpp>
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <regex>
|
||||
#include <chrono>
|
||||
@ -78,7 +80,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::Text("0x%02x", i + 32 * tablePart);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s", makePrintable(i + 32 * tablePart).c_str());
|
||||
ImGui::Text("%s", hex::makePrintable(i + 32 * tablePart).c_str());
|
||||
|
||||
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0, ((rowCount % 2) == 0) ? 0xFF101010 : 0xFF303030);
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <codicons_font.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
|
@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
#include <hex/helpers/lang.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
using namespace hex::lang_literals;
|
||||
|
||||
constexpr static const auto ImHexApiURL = "https://api.werwolv.net/imhex";
|
||||
@ -22,6 +20,11 @@ using s32 = std::int32_t;
|
||||
using s64 = std::int64_t;
|
||||
using s128 = __int128_t;
|
||||
|
||||
struct Region {
|
||||
u64 address;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
#define MAGIC_PATH_SEPARATOR ";"
|
||||
#else
|
||||
|
@ -1,8 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/concepts.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
namespace hex {
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace hex::dp {
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/data_processor/attribute.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <set>
|
||||
#include <string_view>
|
||||
|
148
plugins/libimhex/include/hex/helpers/concepts.hpp
Normal file
148
plugins/libimhex/include/hex/helpers/concepts.hpp
Normal file
@ -0,0 +1,148 @@
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace hex {
|
||||
|
||||
template<typename>
|
||||
struct is_integral_helper : public std::false_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u8> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s8> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u16> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s16> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u32> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s32> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u64> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s64> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u128> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s128> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<bool> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char8_t> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char16_t> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char32_t> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<wchar_t> : public std::true_type { };
|
||||
|
||||
template<typename T>
|
||||
struct is_integral : public is_integral_helper<std::remove_cvref_t<T>>::type { };
|
||||
|
||||
template<typename>
|
||||
struct is_signed_helper : public std::false_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s8> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s16> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s32> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s64> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s128> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<char> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<float> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<double> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<long double> : public std::true_type { };
|
||||
|
||||
template<typename T>
|
||||
struct is_signed : public is_signed_helper<std::remove_cvref_t<T>>::type { };
|
||||
|
||||
template<typename>
|
||||
struct is_floating_point_helper : public std::false_type { };
|
||||
|
||||
template<>
|
||||
struct is_floating_point_helper<float> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_floating_point_helper<double> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_floating_point_helper<long double> : public std::true_type { };
|
||||
|
||||
template<typename T>
|
||||
struct is_floating_point : public is_floating_point_helper<std::remove_cvref_t<T>>::type { };
|
||||
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 12000
|
||||
#if __has_include(<concepts>)
|
||||
// Make sure we break when derived_from is implemented in libc++. Then we can fix a compatibility version above
|
||||
#include <concepts>
|
||||
#endif
|
||||
// libcxx 12 still doesn't have many default concepts implemented, as a result we need to define it ourself using clang built-ins.
|
||||
// [concept.derived] (patch from https://reviews.llvm.org/D74292)
|
||||
namespace hex {
|
||||
template<class _Dp, class _Bp>
|
||||
concept derived_from =
|
||||
__is_base_of(_Bp, _Dp) && __is_convertible_to(const volatile _Dp*, const volatile _Bp*);
|
||||
}
|
||||
|
||||
#else
|
||||
// Assume supported
|
||||
#include <concepts>
|
||||
namespace hex {
|
||||
using std::derived_from;
|
||||
}
|
||||
#endif
|
||||
|
||||
// [concepts.arithmetic]
|
||||
namespace hex {
|
||||
template<class T>
|
||||
concept integral = hex::is_integral<T>::value;
|
||||
|
||||
template<class T>
|
||||
concept signed_integral = integral<T> && hex::is_signed<T>::value;
|
||||
|
||||
template<class T>
|
||||
concept unsigned_integral = integral<T> && !signed_integral<T>;
|
||||
|
||||
template<class T>
|
||||
concept floating_point = std::is_floating_point<T>::value;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct always_false : std::false_type {};
|
19
plugins/libimhex/include/hex/helpers/fmt.hpp
Normal file
19
plugins/libimhex/include/hex/helpers/fmt.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/chrono.h>
|
||||
|
||||
namespace hex {
|
||||
|
||||
template<typename ... Args>
|
||||
inline std::string format(std::string_view format, Args ... args) {
|
||||
return fmt::format(fmt::runtime(format), args...);
|
||||
}
|
||||
|
||||
template<typename ... Args>
|
||||
inline void print(std::string_view format, Args ... args) {
|
||||
fmt::print(fmt::runtime(format), args...);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <future>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/helpers/concepts.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
@ -11,166 +13,15 @@
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/chrono.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <nfd.hpp>
|
||||
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(OS_MACOS)
|
||||
#define off64_t off_t
|
||||
#define fopen64 fopen
|
||||
#define fseeko64 fseek
|
||||
#define ftello64 ftell
|
||||
#endif
|
||||
|
||||
namespace hex {
|
||||
|
||||
template<typename>
|
||||
struct is_integral_helper : public std::false_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u8> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s8> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u16> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s16> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u32> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s32> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u64> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s64> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<u128> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<s128> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<bool> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char8_t> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char16_t> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<char32_t> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_integral_helper<wchar_t> : public std::true_type { };
|
||||
|
||||
template<typename T>
|
||||
struct is_integral : public is_integral_helper<std::remove_cvref_t<T>>::type { };
|
||||
|
||||
template<typename>
|
||||
struct is_signed_helper : public std::false_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s8> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s16> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s32> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s64> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<s128> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<char> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<float> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<double> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_signed_helper<long double> : public std::true_type { };
|
||||
|
||||
template<typename T>
|
||||
struct is_signed : public is_signed_helper<std::remove_cvref_t<T>>::type { };
|
||||
|
||||
template<typename>
|
||||
struct is_floating_point_helper : public std::false_type { };
|
||||
|
||||
template<>
|
||||
struct is_floating_point_helper<float> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_floating_point_helper<double> : public std::true_type { };
|
||||
|
||||
template<>
|
||||
struct is_floating_point_helper<long double> : public std::true_type { };
|
||||
|
||||
template<typename T>
|
||||
struct is_floating_point : public is_floating_point_helper<std::remove_cvref_t<T>>::type { };
|
||||
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 12000
|
||||
#if __has_include(<concepts>)
|
||||
// Make sure we break when derived_from is implemented in libc++. Then we can fix a compatibility version above
|
||||
#include <concepts>
|
||||
#endif
|
||||
// libcxx 12 still doesn't have many default concepts implemented, as a result we need to define it ourself using clang built-ins.
|
||||
// [concept.derived] (patch from https://reviews.llvm.org/D74292)
|
||||
namespace hex {
|
||||
template<class _Dp, class _Bp>
|
||||
concept derived_from =
|
||||
__is_base_of(_Bp, _Dp) && __is_convertible_to(const volatile _Dp*, const volatile _Bp*);
|
||||
}
|
||||
|
||||
#else
|
||||
// Assume supported
|
||||
#include <concepts>
|
||||
namespace hex {
|
||||
using std::derived_from;
|
||||
}
|
||||
#endif
|
||||
|
||||
// [concepts.arithmetic]
|
||||
namespace hex {
|
||||
template<class _Tp>
|
||||
concept integral = hex::is_integral<_Tp>::value;
|
||||
|
||||
template<class _Tp>
|
||||
concept signed_integral = integral<_Tp> && hex::is_signed<_Tp>::value;
|
||||
|
||||
template<class _Tp>
|
||||
concept unsigned_integral = integral<_Tp> && !signed_integral<_Tp>;
|
||||
|
||||
template<class _Tp>
|
||||
concept floating_point = std::is_floating_point<_Tp>::value;
|
||||
}
|
||||
|
||||
#define TOKEN_CONCAT_IMPL(x, y) x ## y
|
||||
#define TOKEN_CONCAT(x, y) TOKEN_CONCAT_IMPL(x, y)
|
||||
#define ANONYMOUS_VARIABLE(prefix) TOKEN_CONCAT(prefix, __COUNTER__)
|
||||
@ -186,16 +37,6 @@ namespace hex {
|
||||
void runCommand(const std::string &command);
|
||||
void openWebpage(std::string url);
|
||||
|
||||
template<typename ... Args>
|
||||
inline std::string format(std::string_view format, Args ... args) {
|
||||
return fmt::format(fmt::runtime(format), args...);
|
||||
}
|
||||
|
||||
template<typename ... Args>
|
||||
inline void print(std::string_view format, Args ... args) {
|
||||
fmt::print(fmt::runtime(format), args...);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr inline u64 extract(u8 from, u8 to, const hex::unsigned_integral auto &value) {
|
||||
using ValueType = std::remove_cvref_t<decltype(value)>;
|
||||
ValueType mask = (std::numeric_limits<ValueType>::max() >> (((sizeof(value) * 8) - 1) - (from - to))) << to;
|
||||
@ -203,9 +44,6 @@ namespace hex {
|
||||
return (value & mask) >> to;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct always_false : std::false_type {};
|
||||
|
||||
template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
|
||||
template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
|
||||
|
||||
@ -416,9 +254,4 @@ namespace hex {
|
||||
|
||||
}
|
||||
|
||||
struct Region {
|
||||
u64 address;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -2,20 +2,21 @@
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/lang/pattern_data.hpp>
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/lang/ast_node.hpp>
|
||||
#include <hex/lang/log_console.hpp>
|
||||
|
||||
#include <bit>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace hex::prv { class Provider; }
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
class PatternData;
|
||||
|
||||
class Evaluator {
|
||||
public:
|
||||
Evaluator() = default;
|
||||
|
@ -1,12 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include "token.hpp"
|
||||
#include "ast_node.hpp"
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
@ -5,9 +5,10 @@
|
||||
#include <imgui.h>
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/lang/token.hpp>
|
||||
#include <hex/views/view.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <codecvt>
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <hex/lang/pattern_data.hpp>
|
||||
#include <hex/lang/log_console.hpp>
|
||||
|
||||
namespace hex::prv { class Provider; }
|
||||
@ -20,6 +19,7 @@ namespace hex::lang {
|
||||
class Parser;
|
||||
class Validator;
|
||||
class Evaluator;
|
||||
class PatternData;
|
||||
|
||||
class PatternLanguage {
|
||||
public:
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
namespace hex::dp {
|
||||
|
||||
Node::Node(std::string_view unlocalizedTitle, std::vector<Attribute> attributes) : m_id(SharedData::dataProcessorNodeIdCounter++), m_unlocalizedTitle(unlocalizedTitle), m_attributes(std::move(attributes)) {
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <locale>
|
||||
#include <filesystem>
|
||||
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#if defined(OS_WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include <hex/lang/evaluator.hpp>
|
||||
|
||||
#include <hex/lang/token.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
#include <hex/lang/token.hpp>
|
||||
#include <hex/lang/pattern_data.hpp>
|
||||
|
||||
#include <bit>
|
||||
#include <algorithm>
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include <hex/lang/parser.hpp>
|
||||
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <optional>
|
||||
|
||||
#define MATCHES(x) (begin() && x)
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include <hex/lang/preprocessor.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
namespace hex::lang {
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include <hex/lang/validator.hpp>
|
||||
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <unordered_set>
|
||||
#include <string>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
Validator::Validator() {
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <imgui_imhex_extensions.h>
|
||||
#include <imgui_internal.h>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
namespace hex::plugin::windows {
|
||||
|
||||
ViewTTYConsole::ViewTTYConsole() : View("hex.windows.view.tty_console.name") {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "helpers/loader_script_handler.hpp"
|
||||
|
||||
#include <hex/views/view.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/views/view.hpp>
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "helpers/patches.hpp"
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
namespace hex {
|
||||
|
||||
static void pushBytesBack(std::vector<u8> &buffer, const char* bytes) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "helpers/plugin_manager.hpp"
|
||||
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
namespace hex {
|
||||
@ -17,7 +19,7 @@ namespace hex {
|
||||
this->m_handle = dlopen(path.data(), RTLD_LAZY);
|
||||
|
||||
if (this->m_handle == nullptr) {
|
||||
hex::log::error("dlopen failed: {}", dlerror());
|
||||
log::error("dlopen failed: {}", dlerror());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "init/splash_window.hpp"
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
#include <hex/resources.hpp>
|
||||
|
||||
@ -145,8 +147,7 @@ namespace hex::init {
|
||||
|
||||
void WindowSplash::initGLFW() {
|
||||
glfwSetErrorCallback([](int error, const char *description) {
|
||||
log::fatal("GLFW Error: {0} - {0}", error, description);
|
||||
exit(EXIT_FAILURE);
|
||||
log::error("GLFW Error [{}] : {}", error, desc);
|
||||
});
|
||||
|
||||
if (!glfwInit()) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "init/tasks.hpp"
|
||||
|
||||
#include <hex/helpers/net.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include "views/view_hexeditor.hpp"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include "window.hpp"
|
||||
|
||||
#include "init/splash_window.hpp"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <time.h>
|
||||
#include <cstring>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include "helpers/project_file_handler.hpp"
|
||||
|
||||
#if defined(OS_WINDOWS)
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "views/view_bookmarks.hpp"
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include "helpers/project_file_handler.hpp"
|
||||
|
||||
#include <cstring>
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "views/view_constants.hpp"
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "views/view_disassembler.hpp"
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <thread>
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "views/view_hashes.hpp"
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/crypto.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include "helpers/project_file_handler.hpp"
|
||||
|
||||
#include <string>
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "views/view_pattern_editor.hpp"
|
||||
|
||||
#include "helpers/project_file_handler.hpp"
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/lang/preprocessor.hpp>
|
||||
#include <hex/lang/pattern_data.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <magic.h>
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "views/view_strings.hpp"
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <thread>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "views/view_yara.hpp"
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <yara.h>
|
||||
#include <filesystem>
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "window.hpp"
|
||||
|
||||
|
||||
#if defined(OS_WINDOWS)
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include <codicons_font.h>
|
||||
|
@ -1,14 +1,15 @@
|
||||
#include "window.hpp"
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/resources.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <csignal>
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
#include <typeinfo>
|
||||
#include <thread>
|
||||
|
||||
#include <imgui.h>
|
||||
|
Loading…
Reference in New Issue
Block a user