File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
exercises/20_class_template Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ int main(int argc, char **argv) {
8080 auto t0 = Tensor4D (s0, d0);
8181 auto t1 = Tensor4D (s1, d1);
8282 t0 += t1;
83- for (unsigned int i = 0 ; i < sizeof (d0) / sizeof (int ); i++ ) {
83+ for (auto i = 0u ; i < sizeof (d0) / sizeof (int ); ++i ) {
8484 ASSERT (t0.data [i] == 7 .f , " Every element of t0 should be 7 after adding t1 to it." );
8585 }
8686 }
@@ -102,8 +102,8 @@ int main(int argc, char **argv) {
102102 auto t0 = Tensor4D (s0, d0);
103103 auto t1 = Tensor4D (s1, d1);
104104 t0 += t1;
105- for (unsigned int i = 0 ; i < sizeof (d0) / sizeof (int ); i++ ) {
106- ASSERT (t0.data [i] == t0. data [i] + 1 , " Every element of t0 should be incremented by 1 after adding t1 to it." );
105+ for (auto i = 0u ; i < sizeof (d0) / sizeof (int ); ++i ) {
106+ ASSERT (t0.data [i] == d0 [i] + 1 , " Every element of t0 should be incremented by 1 after adding t1 to it." );
107107 }
108108 }
109109}
You can’t perform that action at this time.
0 commit comments