Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Replace all decayed array parameters (Type *) with std::vector. For example
void writeIntArray(int32_t* array, size_t length); int32_t* readIntArray(size_t& length);
to
void writeIntArray(const std::vector<int32_t>& array);
std::vector<int32_t> readIntArray();
This removes the ambiguity around memory ownership, makes the method functional (no out param), collocates the length and other array attributes with the vector, and removes null.
Attachments
Issue Links
- links to