You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto suffixOpeningParenthesisPos = std::string::npos;
574
-
auto suffixClosingParenthesisPos = std::string::npos;
575
-
576
-
// Keep track of the current character position when iterating onto `sourceName`
577
-
auto currentPos = decltype(std::string::npos){sourceName.length() - 1};
578
-
579
-
// Here we search for `(` and `)` positions. (Needed to extract the number between those parenthesis)
580
-
for (auto it = sourceName.rbegin(); it < sourceName.rend(); ++it, --currentPos)
581
-
{
582
-
auto c = *it;
583
-
584
-
if (suffixClosingParenthesisPos == std::string::npos && c == ')') suffixClosingParenthesisPos = currentPos;
585
-
if (suffixClosingParenthesisPos != std::string::npos && c == '(') suffixOpeningParenthesisPos = currentPos;
586
-
}
587
-
588
-
// We need to declare our `duplicationCounter` here to store the number between found parenthesis OR 1 (In the case no parenthesis, AKA, suffix, has been found)
589
-
auto duplicationCounter = uint32_t{ 1 };
590
-
591
-
// If the two parenthis have been found AND the closing parenthesis is the last character AND there is a space before the opening parenthesis
// Lambda that checks if the current `foundName` is used by the actor given in parameter (Also ensure that the given actor is adjacent to our new actor)
611
-
// We call "adjacent" two actors that shares the same hierarchical level. (Ex: If [A] and [B] are both direction children of [C], then, they are adjacents)
0 commit comments