aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/src')
-rw-r--r--contrib/epee/src/CMakeLists.txt12
-rw-r--r--contrib/epee/src/byte_slice.cpp4
2 files changed, 8 insertions, 8 deletions
diff --git a/contrib/epee/src/CMakeLists.txt b/contrib/epee/src/CMakeLists.txt
index b4cc7aa8a..7bc75caf3 100644
--- a/contrib/epee/src/CMakeLists.txt
+++ b/contrib/epee/src/CMakeLists.txt
@@ -28,11 +28,8 @@
set(EPEE_INCLUDE_DIR_BASE "${CMAKE_CURRENT_SOURCE_DIR}/../include")
-# Adding headers to the file list, to be able to search for them in IDEs.
-file(GLOB EPEE_HEADERS_PUBLIC
- "${EPEE_INCLUDE_DIR_BASE}/*.h*" # h* will include hpps as well.
- "${EPEE_INCLUDE_DIR_BASE}/**/*.h*" # Any number of subdirs will be included.
-)
+# Add headers to the file list, to be able to search for them and autosave in IDEs.
+monero_find_all_headers(EPEE_HEADERS_PUBLIC "${EPEE_INCLUDE_DIR_BASE}")
monero_add_library(epee byte_slice.cpp byte_stream.cpp hex.cpp abstract_http_client.cpp http_auth.cpp mlog.cpp net_helper.cpp net_utils_base.cpp string_tools.cpp
wipeable_string.cpp levin_base.cpp memwipe.c connection_basic.cpp network_throttle.cpp network_throttle-detail.cpp mlocker.cpp buffer.cpp net_ssl.cpp
@@ -88,5 +85,8 @@ if (USE_READLINE AND (GNU_READLINE_FOUND OR (DEPENDS AND NOT MINGW)))
${GNU_READLINE_LIBRARY})
endif()
-target_include_directories(epee PUBLIC "${EPEE_INCLUDE_DIR_BASE}")
+target_include_directories(epee
+ PUBLIC
+ "${EPEE_INCLUDE_DIR_BASE}"
+ "${OPENSSL_INCLUDE_DIR}")
diff --git a/contrib/epee/src/byte_slice.cpp b/contrib/epee/src/byte_slice.cpp
index 453b63a4c..430853c64 100644
--- a/contrib/epee/src/byte_slice.cpp
+++ b/contrib/epee/src/byte_slice.cpp
@@ -151,7 +151,7 @@ namespace epee
: byte_slice()
{
std::size_t space_needed = 0;
- for (const auto source : sources)
+ for (const auto& source : sources)
space_needed += source.size();
if (space_needed)
@@ -160,7 +160,7 @@ namespace epee
span<std::uint8_t> out{reinterpret_cast<std::uint8_t*>(storage.get() + 1), space_needed};
portion_ = {out.data(), out.size()};
- for (const auto source : sources)
+ for (const auto& source : sources)
{
std::memcpy(out.data(), source.data(), source.size());
if (out.remove_prefix(source.size()) < source.size())