Skip to content

Commit

Permalink
refactor: vector_float.cc
Browse files Browse the repository at this point in the history
- naming aligns with files like packet.cc
  • Loading branch information
mgarbade committed Sep 26, 2022
1 parent bad3cd6 commit e409b05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mediapipe_api/framework/formats/float_vector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ MpReturnCode mp__MakeFloatVectorPacket_At__PA_i_Rt(const float* value, int size,
CATCH_EXCEPTION
}

MpReturnCode mp_Packet__GetFloatVector(mediapipe::Packet* packet, const float** data_out) {
MpReturnCode mp_Packet__GetFloatVector(mediapipe::Packet* packet, const float** value_out) {
TRY_ALL
*data_out = packet->Get<std::vector<float>>().data();
*value_out = packet->Get<std::vector<float>>().data();
RETURN_CODE(MpReturnCode::Success);
CATCH_ALL
}

MpReturnCode mp_Packet__GetFloatVector(mediapipe::Packet* packet, const float** data_out, int* size_out) {
MpReturnCode mp_Packet__GetFloatVector(mediapipe::Packet* packet, const float** value_out, int* size_out) {
TRY_ALL
auto& vector_float = packet->Get<std::vector<float>>();
auto length = vector_float.size();

*data_out = vector_float.data();
*value_out = vector_float.data();
*size_out = length;
RETURN_CODE(MpReturnCode::Success);
CATCH_ALL
Expand Down

0 comments on commit e409b05

Please sign in to comment.