From bb9af1fde25f5c2b4feeaa474392797ae5c4599d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 20 Nov 2025 09:34:21 -0500 Subject: feat: ChunkString: Linux fixes and improved unit test. Signed-off-by: Amlal El Mahrouss --- dev/lib/core/chunk_string.hpp | 1 + dev/lib/net/url.hpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'dev/lib') diff --git a/dev/lib/core/chunk_string.hpp b/dev/lib/core/chunk_string.hpp index 7e5360c..0ecc73e 100644 --- a/dev/lib/core/chunk_string.hpp +++ b/dev/lib/core/chunk_string.hpp @@ -10,6 +10,7 @@ #include #include +#include namespace ocl { diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp index e4eca2a..e5f6803 100644 --- a/dev/lib/net/url.hpp +++ b/dev/lib/net/url.hpp @@ -41,17 +41,17 @@ namespace ocl::net if (protocol.starts_with("https://")) { m_protocol_ = url_protocol::https; - this->operator/=(protocol.substr(strlen("https://"))); + this->operator/=(protocol.substr(std::size("https://"))); } else if (protocol.starts_with("http://")) { m_protocol_ = url_protocol::http; - this->operator/=(protocol.substr(strlen("http://"))); + this->operator/=(protocol.substr(std::size("http://"))); } else if (protocol.starts_with("mailto:")) { m_protocol_ = url_protocol::mailto; - this->operator/=(protocol.substr(strlen("mailto:"))); + this->operator/=(protocol.substr(std::size("mailto:"))); } } -- cgit v1.2.3