Introducing scratchpad to reuse already allocated memory

This commit is contained in:
jpirnay
2026-05-04 17:08:51 +02:00
parent 42a9c09e4c
commit 5486eee4e3
6 changed files with 111 additions and 76 deletions
+4
View File
@@ -7,6 +7,10 @@
namespace FsHelpers {
std::string normalisePath(const std::string& path);
// Out-parameter overload that reuses `out`'s capacity and performs the
// normalisation in-place without allocating a temporary components vector.
// Use inside hot loops to keep heap fragmentation bounded.
void normalisePath(const std::string& path, std::string& out);
/**
* Check if the given filename ends with the specified extension (case-insensitive).