summaryrefslogtreecommitdiffhomepage
path: root/include/stc
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc')
-rw-r--r--include/stc/cdeq.h8
-rw-r--r--include/stc/cvec.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h
index 7a5ae690..f31000db 100644
--- a/include/stc/cdeq.h
+++ b/include/stc/cdeq.h
@@ -315,11 +315,11 @@ cx_memb(_push_front)(Self* self, i_val value) {
}
STC_DEF cx_iter_t
-cx_memb(_insert_range_p)(Self* self, cx_value_t* pos, const cx_value_t* p1,
- const cx_value_t* p2, bool clone) {
+cx_memb(_insert_range_p)(Self* self, cx_value_t* pos,
+ const cx_value_t* p1, const cx_value_t* p2, bool clone) {
pos = cx_memb(_insert_space_)(self, pos, p2 - p1);
cx_iter_t it = {pos};
- if (clone) while (p1 != p2) *pos++ = i_valfrom(i_valto(p1++));
+ if (clone) while (p1 != p2) { *pos++ = i_valfrom(i_valto(p1)); ++p1; }
else memcpy(pos, p1, (p2 - p1)*sizeof *p1);
return it;
}
@@ -328,7 +328,7 @@ STC_DEF cx_iter_t
cx_memb(_emplace_range_p)(Self* self, cx_value_t* pos, const cx_rawvalue_t* p1, const cx_rawvalue_t* p2) {
pos = cx_memb(_insert_space_)(self, pos, p2 - p1);
cx_iter_t it = {pos};
- while (p1 != p2) *pos++ = i_valfrom(*p1++);
+ while (p1 != p2) { *pos++ = i_valfrom(*p1); ++p1; }
return it;
}
diff --git a/include/stc/cvec.h b/include/stc/cvec.h
index 283e769d..745411fc 100644
--- a/include/stc/cvec.h
+++ b/include/stc/cvec.h
@@ -305,11 +305,11 @@ cx_memb(_insert_space_)(Self* self, cx_value_t* pos, size_t len) {
}
STC_DEF cx_iter_t
-cx_memb(_insert_range_p)(Self* self, cx_value_t* pos, const cx_value_t* p1,
- const cx_value_t* p2, bool clone) {
+cx_memb(_insert_range_p)(Self* self, cx_value_t* pos,
+ const cx_value_t* p1, const cx_value_t* p2, bool clone) {
pos = cx_memb(_insert_space_)(self, pos, p2 - p1);
cx_iter_t it = {pos};
- if (clone) while (p1 != p2) *pos++ = i_valfrom(i_valto(p1++));
+ if (clone) while (p1 != p2) { *pos++ = i_valfrom(i_valto(p1)); ++p1; }
else memcpy(pos, p1, (p2 - p1)*sizeof *p1);
return it;
}
@@ -319,7 +319,7 @@ cx_memb(_emplace_range_p)(Self* self, cx_value_t* pos, const cx_rawvalue_t* p1,
const cx_rawvalue_t* p2) {
pos = cx_memb(_insert_space_)(self, pos, p2 - p1);
cx_iter_t it = {pos};
- while (p1 != p2) *pos++ = i_valfrom(*p1++);
+ while (p1 != p2) { *pos++ = i_valfrom(*p1); ++p1; }
return it;
}