Apply clang format

This commit is contained in:
Denis Koronchik
2017-09-01 16:55:00 +03:00
committed by Michael Krasnyk
parent 580c5e39ae
commit c2fd64d3cc
8 changed files with 105 additions and 114 deletions
+5 -7
View File
@@ -10,26 +10,24 @@ namespace util
class OsmIDTyped
{
public:
public:
using HashType = std::uint64_t;
OsmIDTyped(std::uint64_t id_, std::uint8_t type_)
: id(id_)
, type(type_)
OsmIDTyped(std::uint64_t id_, std::uint8_t type_) : id(id_), type(type_)
{
// check if type value not above type size bound
BOOST_ASSERT(id_ < (std::uint64_t(1) << 56));
}
bool operator == (const OsmIDTyped &other) { return (id == other.id && type == other.type); }
bool operator != (const OsmIDTyped &other) { return (id != other.id || type != other.type); }
bool operator==(const OsmIDTyped &other) { return (id == other.id && type == other.type); }
bool operator!=(const OsmIDTyped &other) { return (id != other.id || type != other.type); }
inline HashType Hash() const { return (std::uint64_t(id) | std::uint64_t(type) << 56); }
std::uint64_t GetID() const { return id; }
std::uint8_t GetType() const { return type; }
private:
private:
std::uint64_t id : 56;
std::uint8_t type;
};