summaryrefslogtreecommitdiffstatshomepage
path: root/src/process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.cpp')
-rw-r--r--src/process.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/process.cpp b/src/process.cpp
index e0799d5..5886c41 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -18,8 +18,8 @@
#include <cstddef>
#include <cstring>
+#include <format>
#include <limits>
-#include <sstream>
#include <stdexcept>
#include <string>
#include <utility>
@@ -384,11 +384,9 @@ Resource Process::get_resource(uint32_t id) {
const auto data = ::LockResource(resource);
- if (data == NULL) {
- std::ostringstream oss;
- oss << "Couldn't get data pointer for resource with ID " << id;
- throw std::runtime_error{oss.str()};
- }
+ if (data == NULL)
+ throw std::runtime_error{
+ std::format("Couldn't get data pointer for resource with ID {}", id)};
const auto nb = ::SizeofResource(module, src);