Swap hand-rolled utils for Void primitives
Replace bespoke implementations with the new universal Void utilities: - YouTubeClient: urlEncode -> Void::Encoding::Url::encode; ~140-line decodeHtmlEntities -> Void::Text::html_unescape; parseIso8601Duration -> Void::Time::parse_iso8601_interval. - StateSerializer: getCurrentTimestampISO8601 -> Void::Time::utc_now_iso8601. - Database: generateRpcToken's rand() loop -> Void::Random::random_string (seeded from std::random_device). Link Void::Text / Void::Time / Void::Math. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
d74a69aa34
commit
00759450ff
4 files changed
+18
-211
No files matched your search
@@ -3,9 +3,8 @@
|
||||
#include "echoion/core/state/StateSerializer.hpp"
|
||||
#include <Void/Data/Json.hpp>
|
||||
#include <Void/Data/Reflect.hpp>
|
||||
#include <Void/Time/Format.hpp>
|
||||
#include <format>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
namespace Echoion::Core
|
||||
{
|
||||
@@ -133,12 +132,7 @@ namespace Echoion::Core
|
||||
|
||||
std::string StateSerializer::getCurrentTimestampISO8601()
|
||||
{
|
||||
auto now = std::chrono::system_clock::now();
|
||||
auto time_t_now = std::chrono::system_clock::to_time_t(now);
|
||||
|
||||
std::stringstream ss;
|
||||
ss << std::put_time(std::gmtime(&time_t_now), "%Y-%m-%dT%H:%M:%SZ");
|
||||
return ss.str();
|
||||
return Void::Time::utc_now_iso8601();
|
||||
}
|
||||
|
||||
} // namespace Echoion::Core
|
||||
Reference in new issue
Block a user