Blender V5.3
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
17
19inline bool size_fits_in_int(const int64_t size)
20{
21 return size >= 0 && size <= INT_MAX;
22}
23
25inline 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
#define INT_MAX
bool size_fits_in_int(const int64_t size)
bool index_in_range(const int64_t index, const int64_t size)
__int64 int64_t
Definition BKE_text.h:90