@@ -443,7 +443,7 @@ bool pcl::io::ply::ply_parser::parse (const std::string& filename)
443
443
// ascii
444
444
if (format == ascii_format)
445
445
{
446
- for (const auto element_ptr: elements)
446
+ for (const auto & element_ptr: elements)
447
447
{
448
448
auto & element = *(element_ptr.get ());
449
449
for (std::size_t element_index = 0 ; element_index < element.count ; ++element_index)
@@ -461,7 +461,7 @@ bool pcl::io::ply::ply_parser::parse (const std::string& filename)
461
461
stringstream.unsetf (std::ios_base::skipws);
462
462
stringstream >> std::ws;
463
463
464
- for (const auto property_ptr: element.properties )
464
+ for (const auto & property_ptr: element.properties )
465
465
{
466
466
auto & property = *(property_ptr.get ());
467
467
if (!property.parse (*this , format, stringstream))
@@ -497,14 +497,14 @@ bool pcl::io::ply::ply_parser::parse (const std::string& filename)
497
497
istream.open (filename.c_str (), std::ios::in | std::ios::binary);
498
498
istream.seekg (data_start);
499
499
500
- for (const auto element_ptr: elements)
500
+ for (const auto & element_ptr: elements)
501
501
{
502
502
auto & element = *(element_ptr.get ());
503
503
for (std::size_t element_index = 0 ; element_index < element.count ; ++element_index)
504
504
{
505
505
if (element.begin_element_callback )
506
506
element.begin_element_callback ();
507
- for (const auto property_ptr: element.properties )
507
+ for (const auto & property_ptr: element.properties )
508
508
{
509
509
auto & property = *(property_ptr.get ());
510
510
if (!property.parse (*this , format, istream))
0 commit comments