File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ namespace Sass {
24
24
25
25
size_t L = in.size (), n = 0 ;
26
26
27
+ if (L == 0 ) return {};
27
28
// Exit early if any entry is empty
28
29
for (size_t i = 0 ; i < L; i += 1 ) {
29
30
if (in[i].size () == 0 ) return {};
@@ -80,12 +81,18 @@ namespace Sass {
80
81
81
82
size_t L = in.size ();
82
83
size_t n = in.size () - 1 ;
84
+
85
+ if (L == 0 ) return {};
86
+ // Exit early if any entry is empty
87
+ for (size_t i = 0 ; i < L; i += 1 ) {
88
+ if (in[i].size () == 0 ) return {};
89
+ }
90
+
83
91
size_t * state = new size_t [L];
84
92
std::vector< std::vector<T>> out;
85
93
86
94
// First initialize all states for every permutation group
87
95
for (size_t i = 0 ; i < L; i += 1 ) {
88
- if (in[i].size () == 0 ) return {};
89
96
state[i] = in[i].size () - 1 ;
90
97
}
91
98
@@ -104,10 +111,8 @@ namespace Sass {
104
111
// Current group finished
105
112
if (state[n] == 0 ) {
106
113
// Find position of next decrement
107
- while (n > 0 && state[--n] == 0 )
108
- {
114
+ while (n > 0 && state[--n] == 0 ) {}
109
115
110
- }
111
116
// Check for end condition
112
117
if (state[n] != 0 ) {
113
118
// Decrease next on the left side
You can’t perform that action at this time.
0 commit comments