mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-12-22 02:09:48 +01:00
parent
70fb494aa6
commit
0264e69814
1 changed files with 42 additions and 34 deletions
|
@ -71,13 +71,16 @@ static Hyprlang::CParseResult parseDefineSize(const char* C, const char* V) {
|
|||
Hyprlang::CParseResult result;
|
||||
const std::string VALUE = V;
|
||||
|
||||
if (!VALUE.contains(",")) {
|
||||
CVarList sizes(VALUE, 0, ';');
|
||||
|
||||
for (const auto& sizeStr : sizes) {
|
||||
if (!sizeStr.contains(",")) {
|
||||
result.setError("Invalid define_size");
|
||||
return result;
|
||||
}
|
||||
|
||||
auto LHS = removeBeginEndSpacesTabs(VALUE.substr(0, VALUE.find_first_of(",")));
|
||||
auto RHS = removeBeginEndSpacesTabs(VALUE.substr(VALUE.find_first_of(",") + 1));
|
||||
auto LHS = removeBeginEndSpacesTabs(sizeStr.substr(0, sizeStr.find_first_of(",")));
|
||||
auto RHS = removeBeginEndSpacesTabs(sizeStr.substr(sizeStr.find_first_of(",") + 1));
|
||||
auto DELAY = 0;
|
||||
|
||||
CMeta::SDefinedSize size;
|
||||
|
@ -114,6 +117,7 @@ static Hyprlang::CParseResult parseDefineSize(const char* C, const char* V) {
|
|||
size.size = 0;
|
||||
|
||||
currentMeta->parsedData.definedSizes.push_back(size);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -122,7 +126,11 @@ static Hyprlang::CParseResult parseOverride(const char* C, const char* V) {
|
|||
Hyprlang::CParseResult result;
|
||||
const std::string VALUE = V;
|
||||
|
||||
CVarList overrides(VALUE, 0, ';');
|
||||
|
||||
for (const auto& o : overrides) {
|
||||
currentMeta->parsedData.overrides.push_back(VALUE);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue