From 4861ed68a5d619c71d5f40393fe75ff143a5a90b Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 12 Jun 2023 14:51:10 +0800 Subject: [PATCH] ... --- src/base64.h | 4 ++-- src/easing.h | 4 ++-- src/linalg.h | 4 ++-- src/random.h | 4 ++-- src/re.h | 4 ++-- src/vector.h | 4 ++++ 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/base64.h b/src/base64.h index 52c3fe33..e5d6a087 100644 --- a/src/base64.h +++ b/src/base64.h @@ -1,5 +1,7 @@ #pragma once +#include "common.h" + #if PK_MODULE_BASE64 #include "cffi.h" @@ -196,8 +198,6 @@ inline void add_module_base64(VM* vm){ #else -#include "common.h" - ADD_MODULE_PLACEHOLDER(base64) #endif \ No newline at end of file diff --git a/src/easing.h b/src/easing.h index 9fccb74b..71a7bb4d 100644 --- a/src/easing.h +++ b/src/easing.h @@ -1,5 +1,7 @@ #pragma once +#include "common.h" + #if PK_MODULE_EASING #include "cffi.h" @@ -258,8 +260,6 @@ inline void add_module_easing(VM* vm){ #else -#include "common.h" - ADD_MODULE_PLACEHOLDER(easing) #endif \ No newline at end of file diff --git a/src/linalg.h b/src/linalg.h index 960118d9..6a45adae 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -1,5 +1,7 @@ #pragma once +#include "common.h" + #if PK_MODULE_LINALG #include "cffi.h" @@ -678,8 +680,6 @@ static_assert(sizeof(Py_) <= 64); #else -#include "common.h" - ADD_MODULE_PLACEHOLDER(linalg) #endif \ No newline at end of file diff --git a/src/random.h b/src/random.h index bb733704..f49feaf3 100644 --- a/src/random.h +++ b/src/random.h @@ -1,5 +1,7 @@ #pragma once +#include "common.h" + #if PK_MODULE_RANDOM #include @@ -61,8 +63,6 @@ inline void add_module_random(VM* vm){ #else -#include "common.h" - ADD_MODULE_PLACEHOLDER(random) #endif \ No newline at end of file diff --git a/src/re.h b/src/re.h index abc33b9f..eebdeb3f 100644 --- a/src/re.h +++ b/src/re.h @@ -1,5 +1,7 @@ #pragma once +#include "common.h" + #if PK_MODULE_RE #include "cffi.h" @@ -87,8 +89,6 @@ inline void add_module_re(VM* vm){ #else -#include "common.h" - ADD_MODULE_PLACEHOLDER(re) #endif \ No newline at end of file diff --git a/src/vector.h b/src/vector.h index a350d073..83658ed7 100644 --- a/src/vector.h +++ b/src/vector.h @@ -105,6 +105,10 @@ struct pod_vector{ _size--; } + void reverse(){ + std::reverse(_data, _data+_size); + } + void resize(int size){ if(size > _capacity) reserve(size); _size = size;