@@ -109,7 +109,7 @@ namespace pcl
109
109
// Encode size of compressed disparity image data
110
110
compressedDataOut_arg.write (reinterpret_cast <const char *> (&compressedDisparitySize), sizeof (compressedDisparitySize));
111
111
// Output compressed disparity to ostream
112
- compressedDataOut_arg.write (reinterpret_cast <const char *> (& compressedDisparity[ 0 ] ), compressedDisparity.size () * sizeof (std::uint8_t ));
112
+ compressedDataOut_arg.write (reinterpret_cast <const char *> (compressedDisparity. data () ), compressedDisparity.size () * sizeof (std::uint8_t ));
113
113
114
114
// Compress color information
115
115
if (CompressionPointTraits<PointT>::hasColor && doColorEncoding)
@@ -127,7 +127,7 @@ namespace pcl
127
127
// Encode size of compressed Color image data
128
128
compressedDataOut_arg.write (reinterpret_cast <const char *> (&compressedColorSize), sizeof (compressedColorSize));
129
129
// Output compressed disparity to ostream
130
- compressedDataOut_arg.write (reinterpret_cast <const char *> (& compressedColor[ 0 ] ), compressedColor.size () * sizeof (std::uint8_t ));
130
+ compressedDataOut_arg.write (reinterpret_cast <const char *> (compressedColor. data () ), compressedColor.size () * sizeof (std::uint8_t ));
131
131
132
132
if (bShowStatistics_arg)
133
133
{
@@ -194,8 +194,8 @@ namespace pcl
194
194
std::uint32_t compressedColorSize = 0 ;
195
195
196
196
// Remove color information of invalid points
197
- std::uint16_t * depth_ptr = & disparityMap_arg[ 0 ] ;
198
- std::uint8_t * color_ptr = & colorImage_arg[ 0 ] ;
197
+ std::uint16_t * depth_ptr = disparityMap_arg. data () ;
198
+ std::uint8_t * color_ptr = colorImage_arg. data () ;
199
199
200
200
for (std::size_t i = 0 ; i < cloud_size; ++i, ++depth_ptr, color_ptr += sizeof (std::uint8_t ) * 3 )
201
201
{
@@ -211,7 +211,7 @@ namespace pcl
211
211
// Encode size of compressed disparity image data
212
212
compressedDataOut_arg.write (reinterpret_cast <const char *> (&compressedDisparitySize), sizeof (compressedDisparitySize));
213
213
// Output compressed disparity to ostream
214
- compressedDataOut_arg.write (reinterpret_cast <const char *> (& compressedDisparity[ 0 ] ), compressedDisparity.size () * sizeof (std::uint8_t ));
214
+ compressedDataOut_arg.write (reinterpret_cast <const char *> (compressedDisparity. data () ), compressedDisparity.size () * sizeof (std::uint8_t ));
215
215
216
216
// Compress color information
217
217
if (!colorImage_arg.empty () && doColorEncoding)
@@ -244,7 +244,7 @@ namespace pcl
244
244
// Encode size of compressed Color image data
245
245
compressedDataOut_arg.write (reinterpret_cast <const char *> (&compressedColorSize), sizeof (compressedColorSize));
246
246
// Output compressed disparity to ostream
247
- compressedDataOut_arg.write (reinterpret_cast <const char *> (& compressedColor[ 0 ] ), compressedColor.size () * sizeof (std::uint8_t ));
247
+ compressedDataOut_arg.write (reinterpret_cast <const char *> (compressedColor. data () ), compressedColor.size () * sizeof (std::uint8_t ));
248
248
249
249
if (bShowStatistics_arg)
250
250
{
@@ -320,12 +320,12 @@ namespace pcl
320
320
// reading compressed disparity data
321
321
compressedDataIn_arg.read (reinterpret_cast <char *> (&compressedDisparitySize), sizeof (compressedDisparitySize));
322
322
compressedDisparity.resize (compressedDisparitySize);
323
- compressedDataIn_arg.read (reinterpret_cast <char *> (& compressedDisparity[ 0 ] ), compressedDisparitySize * sizeof (std::uint8_t ));
323
+ compressedDataIn_arg.read (reinterpret_cast <char *> (compressedDisparity. data () ), compressedDisparitySize * sizeof (std::uint8_t ));
324
324
325
325
// reading compressed rgb data
326
326
compressedDataIn_arg.read (reinterpret_cast <char *> (&compressedColorSize), sizeof (compressedColorSize));
327
327
compressedColor.resize (compressedColorSize);
328
- compressedDataIn_arg.read (reinterpret_cast <char *> (& compressedColor[ 0 ] ), compressedColorSize * sizeof (std::uint8_t ));
328
+ compressedDataIn_arg.read (reinterpret_cast <char *> (compressedColor. data () ), compressedColorSize * sizeof (std::uint8_t ));
329
329
330
330
std::size_t png_width = 0 ;
331
331
std::size_t png_height = 0 ;
0 commit comments