Skip to content

Commit d0ec11d

Browse files
DIlkhush00mvieth
authored andcommitted
use 'empty' method to check for emptiness instead of 'length'
1 parent 4900f66 commit d0ec11d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io/src/openni2/openni2_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pcl::io::openni2::OpenNI2Device::OpenNI2Device (const std::string& device_URI)
5656

5757
openni_device_.reset (new openni::Device);
5858

59-
if (device_URI.length () > 0)
59+
if (!device_URI.empty())
6060
status = openni_device_->open (device_URI.c_str ());
6161
else
6262
status = openni_device_->open (openni::ANY_DEVICE);

0 commit comments

Comments
 (0)