Blender  V3.3
asset_library_reference.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "BLI_hash.hh"
8 
10 
11 namespace blender::ed::asset {
12 
14  : AssetLibraryReference(reference)
15 {
16 }
17 
19 {
20  return (a.type == b.type) &&
21  ((a.type == ASSET_LIBRARY_CUSTOM) ? (a.custom_library_index == b.custom_library_index) :
22  true);
23 }
24 
26 {
27  uint64_t hash1 = DefaultHash<decltype(type)>{}(type);
28  if (type != ASSET_LIBRARY_CUSTOM) {
29  return hash1;
30  }
31 
33  return hash1 ^ (hash2 * 33); /* Copied from DefaultHash for std::pair. */
34 }
35 
36 } // namespace blender::ed::asset
@ ASSET_LIBRARY_CUSTOM
AssetLibraryReferenceWrapper(const AssetLibraryReference &reference)
static unsigned a[3]
Definition: RandGen.cpp:78
bool operator==(const AssetLibraryReferenceWrapper &a, const AssetLibraryReferenceWrapper &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
unsigned __int64 uint64_t
Definition: stdint.h:90