Blender
V5.0
source
blender
editors
asset
intern
asset_library_reference.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11
#pragma once
12
13
#include "
BLI_hash.hh
"
14
15
#include "
DNA_asset_types.h
"
16
17
inline
bool
operator==
(
const
AssetLibraryReference
&a,
const
AssetLibraryReference
&
b
)
18
{
19
return
(a.
type
==
b
.type) &&
20
((a.
type
==
ASSET_LIBRARY_CUSTOM
) ? (a.
custom_library_index
==
b
.custom_library_index) :
21
true
);
22
}
23
24
namespace
blender
{
25
26
template
<>
struct
DefaultHash
<
AssetLibraryReference
> {
27
uint64_t
operator()
(
const
AssetLibraryReference
&value)
const
28
{
29
return
get_default_hash
(value.
type
, value.
custom_library_index
);
30
}
31
};
32
33
}
// namespace blender
BLI_hash.hh
DNA_asset_types.h
ASSET_LIBRARY_CUSTOM
@ ASSET_LIBRARY_CUSTOM
Definition
DNA_asset_types.h:109
operator==
bool operator==(const AssetLibraryReference &a, const AssetLibraryReference &b)
Definition
asset_library_reference.hh:17
uint64_t
unsigned long long int uint64_t
Definition
btConvexHullComputer.cpp:33
b
b
Definition
compositor_morphological_distance_infos.hh:24
blender
Definition
ANIM_action.hh:36
blender::get_default_hash
uint64_t get_default_hash(const T &v, const Args &...args)
Definition
BLI_hash.hh:233
AssetLibraryReference
Definition
DNA_asset_types.h:143
AssetLibraryReference::type
short type
Definition
DNA_asset_types.h:144
AssetLibraryReference::custom_library_index
int custom_library_index
Definition
DNA_asset_types.h:151
blender::DefaultHash< AssetLibraryReference >::operator()
uint64_t operator()(const AssetLibraryReference &value) const
Definition
asset_library_reference.hh:27
blender::DefaultHash
Definition
BLI_hash.hh:83
Generated on
for Blender by
doxygen
1.16.1