Skip to content

Commit

Permalink
Follow comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuani committed Oct 6, 2023
1 parent fba509f commit 9e114a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/custom/visa_service.custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ ::grpc::Status VisaService::Read(::grpc::ServerContext* context, const ReadReque
std::string* buffer = response->mutable_buffer();
buffer->resize(count);
ViUInt32 return_count{};
auto status = library_->Read(vi, (ViByte*)buffer->data(), count, &return_count);
auto status = library_->Read(vi, reinterpret_cast<ViByte*>(&buffer[0]), count, &return_count);
if (!status_ok(status) && return_count == 0) {
return ConvertApiErrorStatusForViSession(context, status, vi);
}
Expand Down Expand Up @@ -461,7 +461,7 @@ ::grpc::Status VisaService::UsbControlIn(::grpc::ServerContext* context, const U
std::string* buffer = response->mutable_buffer();
buffer->resize(w_length);
ViUInt16 return_count{};
auto status = library_->UsbControlIn(vi, bm_request_type, b_request, w_value, w_index, w_length, (ViByte*)buffer->data(), &return_count);
auto status = library_->UsbControlIn(vi, bm_request_type, b_request, w_value, w_index, w_length, reinterpret_cast<ViByte*>(&buffer[0]), &return_count);
if (!status_ok(status) && return_count == 0) {
return ConvertApiErrorStatusForViSession(context, status, vi);
}
Expand Down

0 comments on commit 9e114a6

Please sign in to comment.