Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

update style to match latest uncrustify #65

Merged
merged 1 commit into from
Sep 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ struct DepthTraits {};
template<>
struct DepthTraits<uint16_t>
{
static inline bool valid(uint16_t depth) {return depth != 0; }
static inline float toMeters(uint16_t depth) {return depth * 0.001f; } // originally mm
static inline uint16_t fromMeters(float depth) {return (depth * 1000.0f) + 0.5f; }
static inline bool valid(uint16_t depth) {return depth != 0;}
static inline float toMeters(uint16_t depth) {return depth * 0.001f;} // originally mm
static inline uint16_t fromMeters(float depth) {return (depth * 1000.0f) + 0.5f;}
static inline void initializeBuffer(std::vector<uint8_t> &) {} // Do nothing
};

template<>
struct DepthTraits<float>
{
static inline bool valid(float depth) {return std::isfinite(depth); }
static inline float toMeters(float depth) {return depth; }
static inline float fromMeters(float depth) {return depth; }
static inline bool valid(float depth) {return std::isfinite(depth);}
static inline float toMeters(float depth) {return depth;}
static inline float fromMeters(float depth) {return depth;}

static inline void initializeBuffer(std::vector<uint8_t> & buffer)
{
Expand Down