Cleanup: brace placement /w structs

This commit is contained in:
Campbell Barton
2015-04-07 11:25:42 +10:00
parent e2eeb46a1b
commit 9510137d12
19 changed files with 33 additions and 66 deletions

View File

@@ -180,8 +180,7 @@ const char *BLF_translate_do_new_dataname(const char *msgctxt, const char *msgid
#define BLF_I18NCONTEXT_ID_MASK "Mask" #define BLF_I18NCONTEXT_ID_MASK "Mask"
/* Helper for bpy.app.i18n object... */ /* Helper for bpy.app.i18n object... */
typedef struct typedef struct {
{
const char *c_id; const char *c_id;
const char *py_id; const char *py_id;
const char *value; const char *value;

View File

@@ -507,8 +507,7 @@ const struct ListBase *BKE_node_clipboard_get_links(void);
int BKE_node_clipboard_get_type(void); int BKE_node_clipboard_get_type(void);
/* Node Instance Hash */ /* Node Instance Hash */
typedef struct bNodeInstanceHash typedef struct bNodeInstanceHash {
{
GHash *ghash; /* XXX should be made a direct member, GHash allocation needs to support it */ GHash *ghash; /* XXX should be made a direct member, GHash allocation needs to support it */
} bNodeInstanceHash; } bNodeInstanceHash;

View File

@@ -38,8 +38,7 @@
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
typedef struct TseGroup typedef struct TseGroup {
{
TreeStoreElem **elems; TreeStoreElem **elems;
int size; int size;
int allocated; int allocated;

View File

@@ -507,8 +507,7 @@ VChar *BLI_vfontchar_from_freetypefont(VFont *vfont, unsigned long character)
/* Freetype2 Outline struct */ /* Freetype2 Outline struct */
typedef struct FT_Outline_ typedef struct FT_Outline_ {
{
short n_contours; /* number of contours in glyph */ short n_contours; /* number of contours in glyph */
short n_points; /* number of points in the glyph */ short n_points; /* number of points in the glyph */

View File

@@ -81,8 +81,7 @@
* 'BLI_hash_md5_stream' and 'BLI_hash_md5_buffer'. */ * 'BLI_hash_md5_stream' and 'BLI_hash_md5_buffer'. */
/* Structure to save state of computation between the single steps. */ /* Structure to save state of computation between the single steps. */
struct md5_ctx struct md5_ctx {
{
md5_uint32 A; md5_uint32 A;
md5_uint32 B; md5_uint32 B;
md5_uint32 C; md5_uint32 C;

View File

@@ -62,8 +62,7 @@ void VariableSizeBokehBlurOperation::initExecution()
#endif #endif
QualityStepHelper::initExecution(COM_QH_INCREASE); QualityStepHelper::initExecution(COM_QH_INCREASE);
} }
struct VariableSizeBokehBlurTileData struct VariableSizeBokehBlurTileData {
{
MemoryBuffer *color; MemoryBuffer *color;
MemoryBuffer *bokeh; MemoryBuffer *bokeh;
MemoryBuffer *size; MemoryBuffer *size;

View File

@@ -220,8 +220,7 @@ void walk_modal_keymap(wmKeyConfig *keyconf)
} }
typedef struct WalkTeleport typedef struct WalkTeleport {
{
eWalkTeleportState state; eWalkTeleportState state;
float duration; /* from user preferences */ float duration; /* from user preferences */
float origin[3]; float origin[3];

View File

@@ -89,8 +89,7 @@ struct IK_Target;
typedef void (*ErrorCallback)(const iTaSC::ConstraintValues *values, unsigned int nvalues, IK_Target *iktarget); typedef void (*ErrorCallback)(const iTaSC::ConstraintValues *values, unsigned int nvalues, IK_Target *iktarget);
// one structure for each target in the scene // one structure for each target in the scene
struct IK_Target struct IK_Target {
{
struct Scene *blscene; struct Scene *blscene;
iTaSC::MovingFrame* target; iTaSC::MovingFrame* target;
iTaSC::ConstraintSet* constraint; iTaSC::ConstraintSet* constraint;

View File

@@ -52,8 +52,7 @@ enum format {
format_Cineon format_Cineon
}; };
typedef struct LogImageElement typedef struct LogImageElement {
{
int depth; int depth;
int bitsPerSample; int bitsPerSample;
int dataOffset; int dataOffset;
@@ -67,8 +66,7 @@ typedef struct LogImageElement
float maxValue; /* = 2^bitsPerSample - 1 (used internally, doesn't come from the file header) */ float maxValue; /* = 2^bitsPerSample - 1 (used internally, doesn't come from the file header) */
} LogImageElement; } LogImageElement;
typedef struct LogImageFile typedef struct LogImageFile {
{
/* specified in header */ /* specified in header */
int width; int width;
int height; int height;

View File

@@ -64,8 +64,7 @@
#include <Stream.h> #include <Stream.h>
/// DXT1 block. /// DXT1 block.
struct BlockDXT1 struct BlockDXT1 {
{
Color16 col0; Color16 col0;
Color16 col1; Color16 col1;
union { union {
@@ -98,8 +97,7 @@ inline bool BlockDXT1::isFourColorMode() const
/// DXT3 alpha block with explicit alpha. /// DXT3 alpha block with explicit alpha.
struct AlphaBlockDXT3 struct AlphaBlockDXT3 {
{
union { union {
struct { struct {
uint alpha0 : 4; uint alpha0 : 4;
@@ -130,8 +128,7 @@ struct AlphaBlockDXT3
/// DXT3 block. /// DXT3 block.
struct BlockDXT3 struct BlockDXT3 {
{
AlphaBlockDXT3 alpha; AlphaBlockDXT3 alpha;
BlockDXT1 color; BlockDXT1 color;
@@ -144,8 +141,7 @@ struct BlockDXT3
/// DXT5 alpha block. /// DXT5 alpha block.
struct AlphaBlockDXT5 struct AlphaBlockDXT5 {
{
// uint64 unions do not compile on all platforms // uint64 unions do not compile on all platforms
#if 0 #if 0
union { union {
@@ -208,8 +204,7 @@ struct AlphaBlockDXT5
/// DXT5 block. /// DXT5 block.
struct BlockDXT5 struct BlockDXT5 {
{
AlphaBlockDXT5 alpha; AlphaBlockDXT5 alpha;
BlockDXT1 color; BlockDXT1 color;
@@ -221,8 +216,7 @@ struct BlockDXT5
}; };
/// ATI1 block. /// ATI1 block.
struct BlockATI1 struct BlockATI1 {
{
AlphaBlockDXT5 alpha; AlphaBlockDXT5 alpha;
void decodeBlock(ColorBlock * block) const; void decodeBlock(ColorBlock * block) const;
@@ -232,8 +226,7 @@ struct BlockATI1
}; };
/// ATI2 block. /// ATI2 block.
struct BlockATI2 struct BlockATI2 {
{
AlphaBlockDXT5 x; AlphaBlockDXT5 x;
AlphaBlockDXT5 y; AlphaBlockDXT5 y;
@@ -244,8 +237,7 @@ struct BlockATI2
}; };
/// CTX1 block. /// CTX1 block.
struct BlockCTX1 struct BlockCTX1 {
{
uint8 col0[2]; uint8 col0[2];
uint8 col1[2]; uint8 col1[2];
union { union {

View File

@@ -41,8 +41,7 @@
#include <Image.h> #include <Image.h>
/// Uncompressed 4x4 color block. /// Uncompressed 4x4 color block.
struct ColorBlock struct ColorBlock {
{
ColorBlock(); ColorBlock();
ColorBlock(const uint * linearImage); ColorBlock(const uint * linearImage);
ColorBlock(const ColorBlock & block); ColorBlock(const ColorBlock & block);

View File

@@ -496,8 +496,7 @@ void mem_read(Stream & mem, DDSHeader & header)
namespace namespace
{ {
struct FormatDescriptor struct FormatDescriptor {
{
uint format; uint format;
uint bitcount; uint bitcount;
uint rmask; uint rmask;

View File

@@ -63,8 +63,7 @@
#include <ColorBlock.h> #include <ColorBlock.h>
#include <Image.h> #include <Image.h>
struct DDSPixelFormat struct DDSPixelFormat {
{
uint size; uint size;
uint flags; uint flags;
uint fourcc; uint fourcc;
@@ -75,8 +74,7 @@ struct DDSPixelFormat
uint amask; uint amask;
}; };
struct DDSCaps struct DDSCaps {
{
uint caps1; uint caps1;
uint caps2; uint caps2;
uint caps3; uint caps3;
@@ -84,8 +82,7 @@ struct DDSCaps
}; };
/// DDS file header for DX10. /// DDS file header for DX10.
struct DDSHeader10 struct DDSHeader10 {
{
uint dxgiFormat; uint dxgiFormat;
uint resourceDimension; uint resourceDimension;
uint miscFlag; uint miscFlag;
@@ -94,8 +91,7 @@ struct DDSHeader10
}; };
/// DDS file header. /// DDS file header.
struct DDSHeader struct DDSHeader {
{
uint fourcc; uint fourcc;
uint size; uint size;
uint flags; uint flags;

View File

@@ -30,8 +30,7 @@
#ifndef __STREAM_H__ #ifndef __STREAM_H__
#define __STREAM_H__ #define __STREAM_H__
struct Stream struct Stream {
{
unsigned char *mem; // location in memory unsigned char *mem; // location in memory
unsigned int size; // size unsigned int size; // size
unsigned int pos; // current position unsigned int pos; // current position

View File

@@ -137,16 +137,14 @@ typedef struct Brush {
float mask_stencil_dimension[2]; float mask_stencil_dimension[2];
} Brush; } Brush;
typedef struct PaletteColor typedef struct PaletteColor {
{
struct PaletteColor *next, *prev; struct PaletteColor *next, *prev;
/* two values, one to store rgb, other to store values for sculpt/weight */ /* two values, one to store rgb, other to store values for sculpt/weight */
float rgb[3]; float rgb[3];
float value; float value;
} PaletteColor; } PaletteColor;
typedef struct Palette typedef struct Palette {
{
ID id; ID id;
/* pointer to individual colours */ /* pointer to individual colours */
@@ -156,14 +154,12 @@ typedef struct Palette
int pad; int pad;
} Palette; } Palette;
typedef struct PaintCurvePoint typedef struct PaintCurvePoint {
{
BezTriple bez; /* bezier handle */ BezTriple bez; /* bezier handle */
float pressure; /* pressure on that point */ float pressure; /* pressure on that point */
} PaintCurvePoint; } PaintCurvePoint;
typedef struct PaintCurve typedef struct PaintCurve {
{
ID id; ID id;
PaintCurvePoint *points; /* points of curve */ PaintCurvePoint *points; /* points of curve */
int tot_points; int tot_points;

View File

@@ -268,8 +268,7 @@ typedef struct bNode {
/* Unique hash key for identifying node instances /* Unique hash key for identifying node instances
* Defined as a struct because DNA does not support other typedefs. * Defined as a struct because DNA does not support other typedefs.
*/ */
typedef struct bNodeInstanceKey typedef struct bNodeInstanceKey {
{
unsigned int value; unsigned int value;
} bNodeInstanceKey; } bNodeInstanceKey;

View File

@@ -554,8 +554,7 @@ typedef enum eSpaceSeq_Proxy_RenderSize {
SEQ_PROXY_RENDER_SIZE_FULL = 100 SEQ_PROXY_RENDER_SIZE_FULL = 100
} eSpaceSeq_Proxy_RenderSize; } eSpaceSeq_Proxy_RenderSize;
typedef struct MaskSpaceInfo typedef struct MaskSpaceInfo {
{
/* **** mask editing **** */ /* **** mask editing **** */
struct Mask *mask; struct Mask *mask;
/* draw options */ /* draw options */

View File

@@ -47,8 +47,7 @@
#include "../generic/python_utildefines.h" #include "../generic/python_utildefines.h"
typedef struct typedef struct {
{
PyObject_HEAD PyObject_HEAD
/* The string used to separate context from actual message in PY_TRANSLATE RNA props. */ /* The string used to separate context from actual message in PY_TRANSLATE RNA props. */
const char *context_separator; const char *context_separator;

View File

@@ -122,8 +122,7 @@ enum {
}; };
/* controls state of render, everything that's read-only during render stage */ /* controls state of render, everything that's read-only during render stage */
struct Render struct Render {
{
struct Render *next, *prev; struct Render *next, *prev;
char name[RE_MAXNAME]; char name[RE_MAXNAME];
int slot; int slot;