File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ void Ptp::ReceivePtpData(const nlohmann::json &data) {
3232 {" b" , offset},
3333 };
3434 std::string out = jsons.dump () + " \n " ;
35- if (net_ptr_ != nullptr ) {
35+ if (net_ptr_) {
3636 net_ptr_->sendTo (out.data (), out.size (), target_ip_, port_);
3737 updated_t1_t2_ = false ;
38- } else if (serial_ptr_ != nullptr ) {
38+ } else if (serial_ptr_) {
3939 serial_ptr_->write (reinterpret_cast <uint8_t *>(out.data ()), out.size ());
4040 updated_t1_t2_ = false ;
4141 }
@@ -53,9 +53,9 @@ void Ptp::SendPtpData() const {
5353 {" a" , mark},
5454 };
5555 std::string out = data.dump () + " \n " ;
56- if (net_ptr_ != nullptr ) {
56+ if (net_ptr_) {
5757 net_ptr_->sendTo (out.data (), out.size (), target_ip_, port_);
58- } else if (serial_ptr_ != nullptr ) {
58+ } else if (serial_ptr_) {
5959 serial_ptr_->write (reinterpret_cast <const uint8_t *>(out.data ()), out.size ());
6060 }
6161 std::this_thread::sleep_for (std::chrono::milliseconds (100 ));
You can’t perform that action at this time.
0 commit comments