Skip to content

Commit 7a5368e

Browse files
committed
opt code
1 parent 3e96d5b commit 7a5368e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infinite_sense_core/src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ NetManager::NetManager(std::string target_ip, unsigned short port) : port_(port)
1010
const uint64_t curr_time = static_cast<uint64_t>(
1111
std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now().time_since_epoch())
1212
.count());
13-
net_ptr_->sendTo(reinterpret_cast<const uint8_t*>(&curr_time), sizeof(curr_time), target_ip_, port_);
13+
net_ptr_->sendTo(&curr_time, sizeof(curr_time), target_ip_, port_);
1414
ptp_ = std::make_unique<Ptp>();
1515
ptp_->SetNetPtr(net_ptr_, target_ip_, port_);
1616
}

0 commit comments

Comments
 (0)