Cleanup: clang-format, sort structs & cmake files

This commit is contained in:
Campbell Barton 2019-08-15 01:34:58 +10:00
parent 8cbe9f1b9a
commit 4b9e05b428
11 changed files with 17 additions and 16 deletions

View File

@ -16,8 +16,7 @@
#include "stdosl.h"
shader node_clamp(float Value = 1.0, float Min = 0.0, float Max = 1.0,
output float Result = 0.0)
shader node_clamp(float Value = 1.0, float Min = 0.0, float Max = 1.0, output float Result = 0.0)
{
Result = clamp(Value, Min, Max);
Result = clamp(Value, Min, Max);
}

View File

@ -16,8 +16,12 @@
#include "stdosl.h"
shader node_map_range(float Value = 1.0, float FromMin = 0.0, float FromMax = 1.0,
float ToMin = 0.0, float ToMax = 1.0, output float Result = 0.0)
shader node_map_range(float Value = 1.0,
float FromMin = 0.0,
float FromMax = 1.0,
float ToMin = 0.0,
float ToMax = 1.0,
output float Result = 0.0)
{
if (FromMax != FromMin) {
Result = ToMin + ((Value - FromMin) / (FromMax - FromMin)) * (ToMax - ToMin);

View File

@ -28,11 +28,11 @@
#include <Alembic/AbcGeom/All.h>
struct CustomData;
struct Mesh;
struct MLoop;
struct MLoopUV;
struct MPoly;
struct MVert;
struct Mesh;
using Alembic::Abc::ICompoundProperty;
using Alembic::Abc::OCompoundProperty;

View File

@ -28,12 +28,12 @@
extern "C" {
#endif
struct bNode;
struct ID;
struct Main;
struct Material;
struct Object;
struct Scene;
struct bNode;
/* materials */

View File

@ -36,9 +36,9 @@
/* Uncomment this define to get helpful debugging functions etc. defined. */
// #define DEBUG_CDT
struct CDTVert;
struct CDTEdge;
struct CDTFace;
struct CDTVert;
typedef struct SymEdge {
struct SymEdge *next; /* In face, doing CCW traversal of face. */

View File

@ -128,8 +128,8 @@ set(SRC
engines/gpencil/gpencil_engine.h
engines/gpencil/gpencil_render.c
engines/gpencil/gpencil_shader_fx.c
engines/select/select_engine.c
engines/select/select_draw_utils.c
engines/select/select_engine.c
DRW_engine.h
DRW_select_buffer.h

View File

@ -25,9 +25,9 @@
#define __ED_ANIM_API_H__
struct AnimData;
struct Depsgraph;
struct ID;
struct ListBase;
struct Depsgraph;
struct ARegion;
struct Main;

View File

@ -25,11 +25,11 @@
#define __ED_TEXT_H__
struct ARegion;
struct bContext;
struct SpaceText;
struct Text;
struct UndoStep;
struct UndoType;
struct bContext;
bool ED_text_region_location_from_cursor(struct SpaceText *st,
struct ARegion *ar,

View File

@ -20,8 +20,8 @@ set(INC
../../blenkernel
../../blenlib
../../blentranslation
../../gpu
../../depsgraph
../../gpu
../../imbuf
../../makesdna
../../makesrna

View File

@ -619,7 +619,6 @@ TEST(path_util, PathFrameGet)
}
#undef PATH_FRAME_GET
/* BLI_path_extension */
TEST(path_util, PathExtension)
{
@ -627,8 +626,8 @@ TEST(path_util, PathExtension)
EXPECT_EQ(NULL, BLI_path_extension("Text"));
EXPECT_EQ(NULL, BLI_path_extension("Text…001"));
EXPECT_STREQ(".", BLI_path_extension("some/file."));
EXPECT_STREQ(".gz", BLI_path_extension("some/file.tar.gz"));
EXPECT_STREQ(".", BLI_path_extension("some/file."));
EXPECT_STREQ(".gz", BLI_path_extension("some/file.tar.gz"));
EXPECT_STREQ(".abc", BLI_path_extension("some.def/file.abc"));
EXPECT_STREQ(".abc", BLI_path_extension("C:\\some.def\\file.abc"));
EXPECT_STREQ(".001", BLI_path_extension("Text.001"));

View File

@ -590,7 +590,6 @@ TEST(string, StringStrncasestr)
EXPECT_EQ(res, (void *)NULL);
}
/* BLI_string_is_decimal */
TEST(string, StrIsDecimal)
{