Skip to content

Commit

Permalink
use 'empty' method to check for emptiness instead of 'length'
Browse files Browse the repository at this point in the history
  • Loading branch information
DIlkhush00 authored and mvieth committed Sep 3, 2024
1 parent 4900f66 commit d0ec11d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/src/openni2/openni2_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pcl::io::openni2::OpenNI2Device::OpenNI2Device (const std::string& device_URI)

openni_device_.reset (new openni::Device);

if (device_URI.length () > 0)
if (!device_URI.empty())
status = openni_device_->open (device_URI.c_str ());
else
status = openni_device_->open (openni::ANY_DEVICE);
Expand Down

0 comments on commit d0ec11d

Please sign in to comment.