diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2025-09-10 16:19:18 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2025-09-10 16:19:18 +0200 |
| commit | 5d3ac5e0303c1b1b7d0c100b7369e4b8276a15b7 (patch) | |
| tree | f5b838bc2d8a520211eb1cc47891426bbc182d05 | |
| parent | b81ca2c41ff4d48ca03d9c0e9bb53dd39bdd0a48 (diff) | |
| download | openwar-master.tar.gz openwar-master.tar.bz2 openwar-master.zip | |
| -rw-r--r-- | disasm/disasm.cpp | 4 | ||||
| -rw-r--r-- | emulate/cpustate.hpp | 1 | ||||
| -rw-r--r-- | le/le_file_parser.cpp | 1 | ||||
| -rw-r--r-- | le/le_header_parser.cpp | 1 | ||||
| -rw-r--r-- | le/le_parse_util.cpp | 3 | ||||
| -rw-r--r-- | mz/mz_header_parser.cpp | 1 | ||||
| -rw-r--r-- | run/run.cpp | 5 |
7 files changed, 11 insertions, 5 deletions
diff --git a/disasm/disasm.cpp b/disasm/disasm.cpp index 9ba018a..d0cbbdd 100644 --- a/disasm/disasm.cpp +++ b/disasm/disasm.cpp @@ -3,10 +3,10 @@ #include "extractfunction.hpp" #include <boost/filesystem.hpp> +#include <boost/filesystem/path.hpp> #include <boost/program_options.hpp> #include <iostream> -#include <fstream> int parse_dumpobject_options(std::vector<std::string> arguments); int parse_extractfunction_options(std::vector<std::string> arguments); @@ -54,7 +54,7 @@ int main(int argc, char* argv[]) { options.erase(options.begin()); } - std::string program_name = boost::filesystem::basename(argv[0]); + std::string program_name = boost::filesystem::path(argv[0]).stem().string(); if(command == "help" || vm.count("help")) { if(!vm.count("command")) { diff --git a/emulate/cpustate.hpp b/emulate/cpustate.hpp index be9c254..d01212c 100644 --- a/emulate/cpustate.hpp +++ b/emulate/cpustate.hpp @@ -1,5 +1,6 @@ #pragma once +#include <cstdint> #include <array> #include <bitset> diff --git a/le/le_file_parser.cpp b/le/le_file_parser.cpp index 42b485b..d57d475 100644 --- a/le/le_file_parser.cpp +++ b/le/le_file_parser.cpp @@ -7,6 +7,7 @@ #include <boost/filesystem.hpp> #include <iostream> +#include <fstream> int main(int argc, char* argv[]) { boost::program_options::options_description description; diff --git a/le/le_header_parser.cpp b/le/le_header_parser.cpp index 3cd5770..8b65995 100644 --- a/le/le_header_parser.cpp +++ b/le/le_header_parser.cpp @@ -5,6 +5,7 @@ #include <boost/filesystem.hpp> #include <iostream> +#include <fstream> int main(int argc, char* argv[]) { boost::program_options::options_description description; diff --git a/le/le_parse_util.cpp b/le/le_parse_util.cpp index 4455d24..dc614d4 100644 --- a/le/le_parse_util.cpp +++ b/le/le_parse_util.cpp @@ -2,6 +2,7 @@ #include <sstream> #include <iomanip> +#include <ranges> #include <boost/assert.hpp> @@ -16,7 +17,7 @@ std::vector<uint8_t> read_file_part(std::istream& is, std::streamsize offset, si std::vector<uint8_t> vec; vec.reserve(length); - std::copy_n(std::istream_iterator<uint8_t>(is), length, std::back_inserter(vec)); + std::ranges::copy_n(std::istream_iterator<uint8_t>(is), length, std::back_inserter(vec)); return vec; } diff --git a/mz/mz_header_parser.cpp b/mz/mz_header_parser.cpp index 6010331..3b94130 100644 --- a/mz/mz_header_parser.cpp +++ b/mz/mz_header_parser.cpp @@ -5,6 +5,7 @@ #include <boost/filesystem.hpp> #include <iostream> +#include <fstream> int main(int argc, char* argv[]) { boost::program_options::options_description description; diff --git a/run/run.cpp b/run/run.cpp index b85e001..756b30c 100644 --- a/run/run.cpp +++ b/run/run.cpp @@ -3,6 +3,7 @@ #include <boost/program_options.hpp> #include <boost/filesystem.hpp> #include <boost/asio.hpp> +#include <boost/asio/post.hpp> #include <iostream> #include <fstream> @@ -24,7 +25,7 @@ void action_handler(boost::system::error_code const& error, size_t) { } - io_context.post([](){ + boost::asio::post(io_context, [](){ connection_socket.async_receive(boost::asio::buffer(&message_size, sizeof message_size), 0, action_handler); }); } @@ -53,7 +54,7 @@ void accept_handler(boost::system::error_code const& error) connection_socket.send(boost::asio::buffer(&message, sizeof message)); connection_socket.send(boost::asio::buffer(binary, binary.size())); - io_context.post([](){ + boost::asio::post(io_context, [](){ connection_socket.async_receive(boost::asio::buffer(&message_size, sizeof message_size), 0, action_handler); }); } |
