Cleanup: add forward declaration header for IndexMask and VArray

This avoids duplicating the declaration in multiple places.
This commit is contained in:
Jacques Lucke 2024-02-04 11:55:45 +01:00
parent 3566a9e8de
commit 47cf827049
8 changed files with 39 additions and 33 deletions

View File

@ -24,6 +24,7 @@
#include "BLI_array.hh"
#include "BLI_function_ref.hh"
#include "BLI_index_mask_fwd.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_vector.hh"
@ -31,17 +32,11 @@
struct Object;
struct Collection;
namespace blender {
namespace index_mask {
class IndexMask;
}
using index_mask::IndexMask;
namespace bke {
namespace blender::bke {
class AnonymousAttributePropagationInfo;
class AttributeAccessor;
class MutableAttributeAccessor;
} // namespace bke
} // namespace blender
} // namespace blender::bke
namespace blender::bke {

View File

@ -8,13 +8,7 @@
* \ingroup bke
*/
namespace blender {
namespace index_mask {
class IndexMask;
}
using index_mask::IndexMask;
} // namespace blender
#include "BLI_index_mask_fwd.hh"
#include "BLI_offset_indices.hh"
#include "BKE_mesh.h"

View File

@ -10,15 +10,9 @@
#include <memory>
namespace blender {
namespace index_mask {
class IndexMask;
}
using index_mask::IndexMask;
} // namespace blender
#include "BLI_array.hh"
#include "BLI_bit_group_vector.hh"
#include "BLI_index_mask_fwd.hh"
#include "BLI_offset_indices.hh"
#include "BLI_sys_types.h"

View File

@ -11,15 +11,13 @@
#include "BLI_bit_span.hh"
#include "BLI_function_ref.hh"
#include "BLI_index_mask_fwd.hh"
#include "BLI_linear_allocator.hh"
#include "BLI_offset_span.hh"
#include "BLI_task.hh"
#include "BLI_unique_sorted_indices.hh"
#include "BLI_vector.hh"
namespace blender {
template<typename T> class VArray;
}
#include "BLI_virtual_array_fwd.hh"
namespace blender::index_mask {

View File

@ -0,0 +1,17 @@
/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
namespace blender::index_mask {
class IndexMask;
} // namespace blender::index_mask
namespace blender {
using index_mask::IndexMask;
} // namespace blender

View File

@ -6,13 +6,7 @@
#include <algorithm>
namespace blender {
namespace index_mask {
class IndexMask;
}
using index_mask::IndexMask;
} // namespace blender
#include "BLI_index_mask_fwd.hh"
#include "BLI_index_range.hh"
#include "BLI_span.hh"

View File

@ -0,0 +1,12 @@
/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
namespace blender {
template<typename T> class VArray;
template<typename T> class VMutableArray;
} // namespace blender

View File

@ -251,6 +251,7 @@ set(SRC
BLI_implicit_sharing.hh
BLI_implicit_sharing_ptr.hh
BLI_index_mask.hh
BLI_index_mask_fwd.hh
BLI_index_range.hh
BLI_inplace_priority_queue.hh
BLI_iterator.h
@ -380,6 +381,7 @@ set(SRC
BLI_vector_set.hh
BLI_vector_set_slots.hh
BLI_virtual_array.hh
BLI_virtual_array_fwd.hh
BLI_virtual_vector_array.hh
BLI_voxel.h
BLI_winstuff.h