Skip to content

Commit 4b2991f

Browse files
Aidan63Aidan Lee
andauthored
int64 over size_t (#1276)
Co-authored-by: Aidan Lee <aidan.lee@evcam.com>
1 parent 617aed2 commit 4b2991f

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

include/cpp/marshal/Definitions.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ namespace cpp
129129
bool operator!=(const ValueReference<T>& inRHS) const;
130130

131131
template<class K>
132-
K get(int index);
132+
K get(int64_t index);
133133

134134
template<class K>
135-
void set(int index, K value);
135+
void set(int64_t index, K value);
136136
};
137137

138138
template<class T>
@@ -183,19 +183,19 @@ namespace cpp
183183
TPtr operator->() const;
184184

185185
template<class K>
186-
K get(int index);
186+
K get(int64_t index);
187187

188188
template<class K>
189-
void set(int index, K value);
189+
void set(int64_t index, K value);
190190
};
191191

192192
template<class T>
193193
struct View final
194194
{
195195
::cpp::Pointer<T> ptr;
196-
size_t length;
196+
int64_t length;
197197

198-
View(::cpp::Pointer<T> _ptr, size_t _length);
198+
View(::cpp::Pointer<T> _ptr, int64_t _length);
199199

200200
void clear();
201201
void fill(T value);

include/cpp/marshal/PointerReference.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ inline cpp::marshal::PointerReference<T>::PointerReference(const Boxed<O>& inRHS
5757

5858
template<class T>
5959
template<class K>
60-
inline K cpp::marshal::PointerReference<T>::get(int index)
60+
inline K cpp::marshal::PointerReference<T>::get(int64_t index)
6161
{
6262
return (*Super::ptr)[index];
6363
}
6464

6565
template<class T>
6666
template<class K>
67-
inline void cpp::marshal::PointerReference<T>::set(int index, K value)
67+
inline void cpp::marshal::PointerReference<T>::set(int64_t index, K value)
6868
{
6969
(*Super::ptr)[index] = value;
7070
}

include/cpp/marshal/ValueReference.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ inline cpp::marshal::ValueReference<T>::ValueReference(const Boxed<O>& inRHS) :
5656

5757
template<class T>
5858
template<class K>
59-
inline K cpp::marshal::ValueReference<T>::get(int index)
59+
inline K cpp::marshal::ValueReference<T>::get(int64_t index)
6060
{
6161
return (*Super::ptr)[index];
6262
}
6363

6464
template<class T>
6565
template<class K>
66-
inline void cpp::marshal::ValueReference<T>::set(int index, K value)
66+
inline void cpp::marshal::ValueReference<T>::set(int64_t index, K value)
6767
{
6868
(*Super::ptr)[index] = value;
6969
}

include/cpp/marshal/View.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <cmath>
66

77
template<class T>
8-
inline cpp::marshal::View<T>::View(::cpp::Pointer<T> _ptr, size_t _length) : ptr(_ptr), length(_length) {}
8+
inline cpp::marshal::View<T>::View(::cpp::Pointer<T> _ptr, int64_t _length) : ptr(_ptr), length(_length) {}
99

1010
template<class T>
1111
inline bool cpp::marshal::View<T>::tryCopyTo(const View<T>& destination)

0 commit comments

Comments
 (0)