try fix ABI break

This commit is contained in:
LOSEARDES77 2025-05-06 15:18:28 +02:00
parent 401b0cf406
commit f4a92146a0
2 changed files with 14 additions and 1 deletions

View file

@ -12,9 +12,17 @@ namespace Hyprutils {
* @param lastArgNo The number of arguments to split into
* @param delim The delimiter to use for splitting
* @param removeEmpty Whether to remove empty arguments
*/
CVarList(const std::string& in, const size_t lastArgNo = 0, const char delim = ',', const bool removeEmpty = false);
/** Split string into arg list with escape handling
* @param in The string to split
* @param lastArgNo The number of arguments to split into
* @param delim The delimiter to use for splitting
* @param removeEmpty Whether to remove empty arguments
* @param handleEscape Whether to handle escape characters
*/
CVarList(const std::string& in, const size_t lastArgNo = 0, const char delim = ',', const bool removeEmpty = false, const bool handleEscape = false);
CVarList(const std::string& in, const size_t lastArgNo, const char delim, const bool removeEmpty, const bool handleEscape);
~CVarList() = default;

View file

@ -5,6 +5,11 @@
using namespace Hyprutils::String;
// Original constructor calls the extended one with handleEscape = false
Hyprutils::String::CVarList::CVarList(const std::string& in, const size_t lastArgNo, const char delim, const bool removeEmpty) :
CVarList(in, lastArgNo, delim, removeEmpty, false) {}
// Extended constructor with escape handling parameter
Hyprutils::String::CVarList::CVarList(const std::string& in, const size_t lastArgNo, const char delim, const bool removeEmpty, const bool handleEscape) {
if (!removeEmpty && in.empty()) {
m_vArgs.emplace_back("");