Skip to content

Commit 4aa1655

Browse files
committed
Move bump_dp, get_dp from rust_shape.cpp to rust_shape.h
Put out the darwin fire for real
1 parent 6751d40 commit 4aa1655

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/rt/rust_shape.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,6 @@ const uint8_t CMP_LE = 2u;
3535

3636
namespace shape {
3737

38-
// NB: This function does not align.
39-
template<typename T>
40-
inline data_pair<T>
41-
bump_dp(ptr_pair &ptr) {
42-
data_pair<T> data(*reinterpret_cast<T *>(ptr.fst),
43-
*reinterpret_cast<T *>(ptr.snd));
44-
ptr += sizeof(T);
45-
return data;
46-
}
47-
48-
template<typename T>
49-
inline data_pair<T>
50-
get_dp(ptr_pair &ptr) {
51-
data_pair<T> data(*reinterpret_cast<T *>(ptr.fst),
52-
*reinterpret_cast<T *>(ptr.snd));
53-
return data;
54-
}
55-
5638
// A shape printer, useful for debugging
5739

5840
void

src/rt/rust_shape.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,24 @@ class ptr_pair {
665665
}
666666
};
667667

668+
// NB: This function does not align.
669+
template<typename T>
670+
inline data_pair<T>
671+
bump_dp(ptr_pair &ptr) {
672+
data_pair<T> data(*reinterpret_cast<T *>(ptr.fst),
673+
*reinterpret_cast<T *>(ptr.snd));
674+
ptr += sizeof(T);
675+
return data;
676+
}
677+
678+
template<typename T>
679+
inline data_pair<T>
680+
get_dp(ptr_pair &ptr) {
681+
data_pair<T> data(*reinterpret_cast<T *>(ptr.fst),
682+
*reinterpret_cast<T *>(ptr.snd));
683+
return data;
684+
}
685+
668686
} // end namespace shape
669687

670688

0 commit comments

Comments
 (0)