File tree 5 files changed +12
-8
lines changed
5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,5 @@ BreakConstructorInitializersBeforeComma: true
11
11
NamespaceIndentation : None
12
12
AlignEscapedNewlines : DontAlign
13
13
AlignAfterOpenBracket : DontAlign
14
+ IndentExternBlock : NoIndent
15
+ Macros : [MESHOPTIMIZER_ALLOC_CALLCONV=&_&]
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ nanite: $(DEMO)
123
123
$(DEMO ) -n $(files )
124
124
125
125
format :
126
- clang-format -i $( LIBRARY_SOURCES ) $( DEMO_SOURCES ) $( GLTFPACK_SOURCES )
126
+ clang-format -i src/ * .h src/ * .cpp demo/ * .cpp gltf/ * .h gltf/ * .cpp
127
127
128
128
formatjs :
129
129
prettier -w js/* .js gltf/* .js demo/* .html js/* .ts
Original file line number Diff line number Diff line change
1
+ DisableFormat : true
Original file line number Diff line number Diff line change 1
1
// This file is part of meshoptimizer library; see meshoptimizer.h for version/license details
2
2
#include " meshoptimizer.h"
3
3
4
- void meshopt_setAllocator (void *(MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t ), void(MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void *))
4
+ void meshopt_setAllocator (void * (MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t ), void (MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void *))
5
5
{
6
6
meshopt_Allocator::Storage::allocate = allocate;
7
7
meshopt_Allocator::Storage::deallocate = deallocate;
Original file line number Diff line number Diff line change 35
35
36
36
/* C interface */
37
37
#ifdef __cplusplus
38
- extern " C" {
38
+ extern " C"
39
+ {
39
40
#endif
40
41
41
42
/* *
@@ -601,7 +602,7 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_spatialSortTriangles(unsigned int* desti
601
602
* Note that all algorithms only allocate memory for temporary use.
602
603
* allocate/deallocate are always called in a stack-like order - last pointer to be allocated is deallocated first.
603
604
*/
604
- MESHOPTIMIZER_API void meshopt_setAllocator (void * (MESHOPTIMIZER_ALLOC_CALLCONV * allocate)(size_t ), void (MESHOPTIMIZER_ALLOC_CALLCONV * deallocate)(void *));
605
+ MESHOPTIMIZER_API void meshopt_setAllocator (void * (MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t ), void (MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void *));
605
606
606
607
#ifdef __cplusplus
607
608
} /* extern "C" */
@@ -749,8 +750,8 @@ class meshopt_Allocator
749
750
template <typename T>
750
751
struct StorageT
751
752
{
752
- static void * (MESHOPTIMIZER_ALLOC_CALLCONV * allocate)(size_t );
753
- static void (MESHOPTIMIZER_ALLOC_CALLCONV * deallocate)(void *);
753
+ static void * (MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t );
754
+ static void (MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void *);
754
755
};
755
756
756
757
typedef StorageT<void > Storage;
@@ -790,9 +791,9 @@ class meshopt_Allocator
790
791
791
792
// This makes sure that allocate/deallocate are lazily generated in translation units that need them and are deduplicated by the linker
792
793
template <typename T>
793
- void * (MESHOPTIMIZER_ALLOC_CALLCONV * meshopt_Allocator::StorageT<T>::allocate)(size_t ) = operator new ;
794
+ void * (MESHOPTIMIZER_ALLOC_CALLCONV* meshopt_Allocator::StorageT<T>::allocate)(size_t ) = operator new ;
794
795
template <typename T>
795
- void (MESHOPTIMIZER_ALLOC_CALLCONV * meshopt_Allocator::StorageT<T>::deallocate)(void *) = operator delete ;
796
+ void (MESHOPTIMIZER_ALLOC_CALLCONV* meshopt_Allocator::StorageT<T>::deallocate)(void *) = operator delete ;
796
797
#endif
797
798
798
799
/* Inline implementation for C++ templated wrappers */
You can’t perform that action at this time.
0 commit comments