From c38b56b7017c4335a1e4e182a48f15335745ad86 Mon Sep 17 00:00:00 2001 From: Kunal Tyagi Date: Mon, 23 Mar 2020 13:40:34 +0900 Subject: [PATCH] Misc header correction --- io/include/pcl/io/image.h | 15 ++++++++------- io/src/lzf.cpp | 24 +++++++++++++----------- octree/include/pcl/octree/octree_key.h | 2 +- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/io/include/pcl/io/image.h b/io/include/pcl/io/image.h index 4cb43ee382d..187b388ea01 100644 --- a/io/include/pcl/io/image.h +++ b/io/include/pcl/io/image.h @@ -33,21 +33,21 @@ * POSSIBILITY OF SUCH DAMAGE. * */ - -#pragma once -#include +#pragma once -#include -#include #include - #include +#include +#include +#include + +#include namespace pcl { namespace io - { + { /** * @brief Image interface class providing an interface to fill a RGB or Grayscale image buffer. @@ -212,3 +212,4 @@ namespace pcl } // namespace } + diff --git a/io/src/lzf.cpp b/io/src/lzf.cpp index 3069ec24dff..5f22614de0e 100644 --- a/io/src/lzf.cpp +++ b/io/src/lzf.cpp @@ -4,7 +4,7 @@ * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2000-2010 Marc Alexander Lehmann * Copyright (c) 2010-2011, Willow Garage, Inc. - * + * * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -17,7 +17,7 @@ * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -35,11 +35,13 @@ * */ -#include -#include -#include #include +#include + #include +#include +#include +#include /* * Size of hashtable is (1 << HLOG) * sizeof (char *) @@ -114,7 +116,7 @@ pcl::lzfCompress (const void *const in_data, unsigned int in_len, hval = (hval << 8) | ip[2]; hslot = htab + IDX (hval); - const unsigned char *ref = *hslot + (static_cast (in_data)); + const unsigned char *ref = *hslot + (static_cast (in_data)); *hslot = static_cast (ip - (static_cast (in_data))); // off requires a type wide enough to hold a general pointer difference. @@ -125,14 +127,14 @@ pcl::lzfCompress (const void *const in_data, unsigned int in_len, // special workaround for it. #if defined (WIN32) && defined (_M_X64) && defined (_MSC_VER) // workaround for missing POSIX compliance - unsigned _int64 off; + unsigned _int64 off; #else unsigned long off; #endif if ( // The next test will actually take care of this, but this is faster if htab is initialized - ref < ip + ref < ip && (off = ip - ref - 1) < (1 << 13) && ref > static_cast (in_data) && ref[2] == ip[2] @@ -145,7 +147,7 @@ pcl::lzfCompress (const void *const in_data, unsigned int in_len, { // Match found at *ref++ unsigned int len = 2; - ptrdiff_t maxlen = in_end - ip - len; + std::ptrdiff_t maxlen = in_end - ip - len; maxlen = maxlen > ((1 << 8) + (1 << 3)) ? ((1 << 8) + (1 << 3)) : maxlen; // First a faster conservative test @@ -248,7 +250,7 @@ pcl::lzfCompress (const void *const in_data, unsigned int in_len, } } - // At most 3 bytes can be missing here + // At most 3 bytes can be missing here if (op + 3 > out_end) return (0); @@ -274,7 +276,7 @@ pcl::lzfCompress (const void *const in_data, unsigned int in_len, } /////////////////////////////////////////////////////////////////////////////////////////// -unsigned int +unsigned int pcl::lzfDecompress (const void *const in_data, unsigned int in_len, void *out_data, unsigned int out_len) { diff --git a/octree/include/pcl/octree/octree_key.h b/octree/include/pcl/octree/octree_key.h index 19765235f54..a103d5a31db 100644 --- a/octree/include/pcl/octree/octree_key.h +++ b/octree/include/pcl/octree/octree_key.h @@ -60,7 +60,7 @@ class OctreeKey { {} /** \brief Copy constructor. */ - OctreeKey(const OctreeKey& source) { memcpy(key_, source.key_, sizeof(key_)); } + OctreeKey(const OctreeKey& source) { std::memcpy(key_, source.key_, sizeof(key_)); } OctreeKey& operator=(const OctreeKey&) = default;