diff options
author | Jack Lloyd <[email protected]> | 2016-12-11 15:28:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-18 16:48:24 -0500 |
commit | f3cb3edb512bdcab498d825886c3366c341b3f78 (patch) | |
tree | 645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/utils/mem_ops.h | |
parent | c1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff) |
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency,
eg make_u32bit becomes make_uint32. The old typedefs remain for now
since probably lots of application code uses them.
Diffstat (limited to 'src/lib/utils/mem_ops.h')
-rw-r--r-- | src/lib/utils/mem_ops.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/utils/mem_ops.h b/src/lib/utils/mem_ops.h index b4cf7f76c..13c987526 100644 --- a/src/lib/utils/mem_ops.h +++ b/src/lib/utils/mem_ops.h @@ -80,7 +80,7 @@ template<typename T> inline void copy_mem(T* out, const T* in, size_t n) * @param val the value to set each byte to */ template<typename T> -inline void set_mem(T* ptr, size_t n, byte val) +inline void set_mem(T* ptr, size_t n, uint8_t val) { if(n > 0) { @@ -139,25 +139,25 @@ template<typename T> void xor_buf(T out[], } template<typename Alloc, typename Alloc2> -void xor_buf(std::vector<byte, Alloc>& out, - const std::vector<byte, Alloc2>& in, +void xor_buf(std::vector<uint8_t, Alloc>& out, + const std::vector<uint8_t, Alloc2>& in, size_t n) { xor_buf(out.data(), in.data(), n); } template<typename Alloc> -void xor_buf(std::vector<byte, Alloc>& out, - const byte* in, +void xor_buf(std::vector<uint8_t, Alloc>& out, + const uint8_t* in, size_t n) { xor_buf(out.data(), in, n); } template<typename Alloc, typename Alloc2> -void xor_buf(std::vector<byte, Alloc>& out, - const byte* in, - const std::vector<byte, Alloc2>& in2, +void xor_buf(std::vector<uint8_t, Alloc>& out, + const uint8_t* in, + const std::vector<uint8_t, Alloc2>& in2, size_t n) { xor_buf(out.data(), in, in2.data(), n); |