Cleanup: use static local variables
This commit is contained in:
parent
4abafa2062
commit
6d97f9a5c1
|
@ -86,7 +86,7 @@ static int gNextIconId = 1;
|
|||
/* Protected by gIconMutex. */
|
||||
static int gFirstIconId = 1;
|
||||
|
||||
std::mutex gIconMutex;
|
||||
static std::mutex gIconMutex;
|
||||
|
||||
/* Not mutex-protected! */
|
||||
static GHash *gCachedPreviews = nullptr;
|
||||
|
|
|
@ -67,7 +67,7 @@ struct BLI_mmap_file {
|
|||
* handler if one was configured and abort the process otherwise.
|
||||
*/
|
||||
|
||||
struct error_handler_data {
|
||||
static struct error_handler_data {
|
||||
ListBase open_mmaps;
|
||||
char configured;
|
||||
void (*next_handler)(int, siginfo_t *, void *);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* Based on utf-8 decoder stress-test (https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)
|
||||
* by Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2015-08-28 - CC BY 4.0
|
||||
*/
|
||||
const char *utf8_invalid_tests[][3] = {
|
||||
static const char *utf8_invalid_tests[][3] = {
|
||||
/* 1 Some correct UTF-8 text. */
|
||||
{"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |",
|
||||
"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |", "\x00"},
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "BKE_report.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
#include "RNA_enum_types.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
|
|
|
@ -79,7 +79,7 @@ MAKE_CPP_TYPE(TestType, blender::fn::tests::TestType)
|
|||
|
||||
namespace blender::fn::tests {
|
||||
|
||||
const CPPType &CPPType_TestType = CPPType::get<TestType>();
|
||||
static const CPPType &CPPType_TestType = CPPType::get<TestType>();
|
||||
|
||||
TEST(cpp_type, Size)
|
||||
{
|
||||
|
|
|
@ -77,9 +77,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef WITH_GMP
|
||||
const bool bypass_bmesh = true;
|
||||
static const bool bypass_bmesh = true;
|
||||
#else
|
||||
const bool bypass_bmesh = false;
|
||||
static const bool bypass_bmesh = false;
|
||||
#endif
|
||||
|
||||
static void initData(ModifierData *md)
|
||||
|
@ -729,6 +729,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
|
|||
return exact_boolean_mesh(bmd, ctx, mesh);
|
||||
}
|
||||
#else
|
||||
UNUSED_VARS(bypass_bmesh);
|
||||
const bool use_exact = false;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue