From d0ec11d9c5d35c7761eb4159982fa972710fde7b Mon Sep 17 00:00:00 2001 From: Dilkhush Date: Sat, 31 Aug 2024 12:49:48 +0530 Subject: [PATCH] use 'empty' method to check for emptiness instead of 'length' --- io/src/openni2/openni2_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/src/openni2/openni2_device.cpp b/io/src/openni2/openni2_device.cpp index 8d460471360..b7201ac889c 100644 --- a/io/src/openni2/openni2_device.cpp +++ b/io/src/openni2/openni2_device.cpp @@ -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);