|
14 | 14 | #include "BitSet.h"
|
15 | 15 | #include "Iterators.h"
|
16 | 16 |
|
17 |
| -#define MSA(type, count) Siege::MSArray<type, count> |
18 |
| -#define MSA_IT(type, count, name) LAMBDA(MSA(type, count) & name) |
19 |
| -#define MSA_IT_I(type, count, name, idxName) LAMBDA(MSA(type, count) & name, size_t idxName) |
20 |
| - |
21 | 17 | namespace Siege
|
22 | 18 | {
|
23 | 19 | /**
|
@@ -164,44 +160,6 @@ struct SArray
|
164 | 160 | return {this};
|
165 | 161 | }
|
166 | 162 |
|
167 |
| - template<typename F> |
168 |
| - inline void ForEachI(F&& func) |
169 |
| - { |
170 |
| - size_t i = 0; |
171 |
| - for (auto it = CreateIterator(); it; ++it) |
172 |
| - { |
173 |
| - func(*it, i++); |
174 |
| - } |
175 |
| - } |
176 |
| - |
177 |
| - template<typename F> |
178 |
| - inline void ForEach(F&& func) |
179 |
| - { |
180 |
| - for (auto it = CreateIterator(); it; ++it) |
181 |
| - { |
182 |
| - func(*it); |
183 |
| - } |
184 |
| - } |
185 |
| - |
186 |
| - template<typename F> |
187 |
| - inline void ForEachI(F&& func) const |
188 |
| - { |
189 |
| - size_t i = 0; |
190 |
| - for (auto it = CreateIterator(); it; ++it) |
191 |
| - { |
192 |
| - func(*it, i++); |
193 |
| - } |
194 |
| - } |
195 |
| - |
196 |
| - template<typename F> |
197 |
| - inline void ForEach(F&& func) const |
198 |
| - { |
199 |
| - for (auto it = CreateIterator(); it; ++it) |
200 |
| - { |
201 |
| - func(*it); |
202 |
| - } |
203 |
| - } |
204 |
| - |
205 | 163 | T data[S];
|
206 | 164 | };
|
207 | 165 |
|
@@ -501,146 +459,6 @@ class MSArray
|
501 | 459 | return {this};
|
502 | 460 | }
|
503 | 461 |
|
504 |
| - /** |
505 |
| - * Iterates over the array and runs the provided function for each element-index pair. This |
506 |
| - * iterator works over every single element - not just those that were assigned to |
507 |
| - * @tparam F the function type |
508 |
| - * @param func the function to run over every element |
509 |
| - */ |
510 |
| - template<typename F, |
511 |
| - typename = typename std::enable_if< |
512 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
513 |
| - inline void ForEachI(F&& func) |
514 |
| - { |
515 |
| - size_t i = 0; |
516 |
| - for (auto it = CreateFIterator(); it; ++it) |
517 |
| - { |
518 |
| - func(*it, i++); |
519 |
| - } |
520 |
| - } |
521 |
| - |
522 |
| - /** |
523 |
| - * Iterates over the array and runs the provided function for each element. This |
524 |
| - * iterator works over every single element - not just those that were assigned to |
525 |
| - * @tparam F the function type |
526 |
| - * @param func the function to run over every element |
527 |
| - */ |
528 |
| - template<typename F, |
529 |
| - typename = typename std::enable_if< |
530 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
531 |
| - inline void ForEach(F&& func) |
532 |
| - { |
533 |
| - for (auto it = CreateFIterator(); it; ++it) |
534 |
| - { |
535 |
| - func(*it); |
536 |
| - } |
537 |
| - } |
538 |
| - |
539 |
| - /** |
540 |
| - * Iterates over the array and runs the provided function for each element-index pair. This |
541 |
| - * iterator works over every assigned element in the array |
542 |
| - * @tparam F the function type |
543 |
| - * @param func the function to run over every element |
544 |
| - */ |
545 |
| - template<typename F, |
546 |
| - typename = typename std::enable_if< |
547 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
548 |
| - inline void MForEachI(F&& func) |
549 |
| - { |
550 |
| - size_t i = 0; |
551 |
| - for (auto it = CreateIterator(); it; ++it) |
552 |
| - { |
553 |
| - func(*it, i++); |
554 |
| - } |
555 |
| - } |
556 |
| - |
557 |
| - /** |
558 |
| - * Iterates over the array and runs the provided function for each element. This |
559 |
| - * iterator works over every assigned element in the array |
560 |
| - * @tparam F the function type |
561 |
| - * @param func the function to run over every element |
562 |
| - */ |
563 |
| - template<typename F, |
564 |
| - typename = typename std::enable_if< |
565 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
566 |
| - inline void MForEach(F&& func) |
567 |
| - { |
568 |
| - for (auto it = CreateIterator(); it; ++it) |
569 |
| - { |
570 |
| - func(*it); |
571 |
| - } |
572 |
| - } |
573 |
| - |
574 |
| - /** |
575 |
| - * Iterates over the array and runs the provided function for each element-index pair. This |
576 |
| - * iterator works over every single element - not just those that were assigned to |
577 |
| - * @tparam F the function type |
578 |
| - * @param func the function to run over every element |
579 |
| - */ |
580 |
| - template<typename F, |
581 |
| - typename = typename std::enable_if< |
582 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
583 |
| - inline void ForEachI(F&& func) const |
584 |
| - { |
585 |
| - size_t i = 0; |
586 |
| - for (auto it = CreateFIterator(); it; ++it) |
587 |
| - { |
588 |
| - func(*it, i++); |
589 |
| - } |
590 |
| - } |
591 |
| - |
592 |
| - /** |
593 |
| - * Iterates over the array and runs the provided function for each element. This |
594 |
| - * iterator works over every single element - not just those that were assigned to |
595 |
| - * @tparam F the function type |
596 |
| - * @param func the function to run over every element |
597 |
| - */ |
598 |
| - template<typename F, |
599 |
| - typename = typename std::enable_if< |
600 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
601 |
| - inline void ForEach(F&& func) const |
602 |
| - { |
603 |
| - for (auto it = CreateFIterator(); it; ++it) |
604 |
| - { |
605 |
| - func(*it); |
606 |
| - } |
607 |
| - } |
608 |
| - |
609 |
| - /** |
610 |
| - * Iterates over the array and runs the provided function for each element-index pair. This |
611 |
| - * iterator works over every assigned element in the array |
612 |
| - * @tparam F the function type |
613 |
| - * @param func the function to run over every element |
614 |
| - */ |
615 |
| - template<typename F, |
616 |
| - typename = typename std::enable_if< |
617 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
618 |
| - inline void MForEachI(F&& func) const |
619 |
| - { |
620 |
| - size_t i = 0; |
621 |
| - for (auto it = CreateIterator(); it; ++it) |
622 |
| - { |
623 |
| - func(*it, i++); |
624 |
| - } |
625 |
| - } |
626 |
| - |
627 |
| - /** |
628 |
| - * Iterates over the array and runs the provided function for each element. This |
629 |
| - * iterator works over every assigned element in the array |
630 |
| - * @tparam F the function type |
631 |
| - * @param func the function to run over every element |
632 |
| - */ |
633 |
| - template<typename F, |
634 |
| - typename = typename std::enable_if< |
635 |
| - std::is_function<typename std::remove_reference<F>::type>::value>> |
636 |
| - inline void MForEach(F&& func) const |
637 |
| - { |
638 |
| - for (auto it = CreateIterator(); it; ++it) |
639 |
| - { |
640 |
| - func(*it); |
641 |
| - } |
642 |
| - } |
643 |
| - |
644 | 462 | /**
|
645 | 463 | * Returns the element in the MSArray
|
646 | 464 | * @return the last element in the array
|
|
0 commit comments