X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-scene-loader%2Finternal%2Fhash.h;h=22b770ec7849d6687ee249e7cb021073a7039205;hb=f8242e3b1f84d21f607d1a7b911f77bff0fd7bd5;hp=32c69daba095e97f95ab00e6601a57b1e5879170;hpb=7a315fe9869206bf6ad3195931f27d88fe9c128e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene-loader/internal/hash.h b/dali-scene-loader/internal/hash.h index 32c69da..22b770e 100644 --- a/dali-scene-loader/internal/hash.h +++ b/dali-scene-loader/internal/hash.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE_LOADER_HASH_H_ #define DALI_SCENE_LOADER_HASH_H_ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,15 +17,14 @@ * */ -#include -#include #include +#include +#include namespace Dali { namespace SceneLoader { - /** * @brief Rudimentary hash generator that follows a builder pattern. */ @@ -94,7 +93,7 @@ public: * @brief Applies the bytes of an object @a value, to the hash. * @return Its updated self. */ - template + template Hash& AddObjectBytes(const T& value); operator uint64_t() const; @@ -105,13 +104,12 @@ private: uint64_t Concatenate(uint64_t value); }; - template -Hash& Hash::AddObjectBytes(const T & value) +Hash& Hash::AddObjectBytes(const T& value) { auto i0 = reinterpret_cast(&value); auto i1 = i0 + sizeof(T); - while (i0 != i1) + while(i0 != i1) { mValue = Concatenate(*i0); ++i0; @@ -119,7 +117,7 @@ Hash& Hash::AddObjectBytes(const T & value) return *this; } -} -} +} // namespace SceneLoader +} // namespace Dali #endif // DALI_SCENE_LOADER_HASH_H_