Blender
V5.3
source
blender
io
common
IO_validate.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
12
13
#include <climits>
14
#include <cstdint>
15
16
namespace
blender::io::validate
{
17
19
inline
bool
size_fits_in_int
(
const
int64_t
size)
20
{
21
return
size >= 0 && size <=
INT_MAX
;
22
}
23
25
inline
bool
index_in_range
(
const
int64_t
index
,
const
int64_t
size)
26
{
27
return
(
index
>= 0 &&
index
< size);
28
}
29
30
}
// namespace blender::io::validate
INT_MAX
#define INT_MAX
Definition
gpu_shader_compat_cxx.hh:172
blender::ed::asset::index
Definition
ED_asset_indexer.hh:26
blender::io::validate
Definition
IO_validate.hh:16
blender::io::validate::size_fits_in_int
bool size_fits_in_int(const int64_t size)
Definition
IO_validate.hh:19
blender::io::validate::index_in_range
bool index_in_range(const int64_t index, const int64_t size)
Definition
IO_validate.hh:25
blender::int64_t
__int64 int64_t
Definition
BKE_text.h:90
Generated on
for Blender by
doxygen
1.18.0