Skip to content

Commit

Permalink
[clean] Reformat with clang-format 18 some more
Browse files Browse the repository at this point in the history
Some files were missed in the previous commit.

fixup-for: 189a188 [clean] Reformat with clang-format 18
  • Loading branch information
clang-format authored and grandchild committed Oct 31, 2024
1 parent d16d63e commit a0ed955
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 38 deletions.
22 changes: 11 additions & 11 deletions avs/ns-eel/ns-eel-addfuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,28 @@ be sure to preserve edi, too.

#ifdef _MSC_VER

#define _ARGS1 \
double *parm_a, *__nextBlock; \
#define _ARGS1 \
double *parm_a, *__nextBlock; \
__asm { mov ebp, esp} \
__asm { sub esp, __LOCAL_SIZE } \
__asm { mov dword ptr parm_a, eax} \
__asm { sub esp, __LOCAL_SIZE } \
__asm { mov dword ptr parm_a, eax} \
__asm { mov __nextBlock, esi }

#define _ARGS2 \
double *parm_a, *parm_b, *__nextBlock; \
__asm { mov ebp, esp} \
__asm { mov ebp, esp} \
__asm { sub esp, __LOCAL_SIZE } \
__asm { mov dword ptr parm_a, eax} \
__asm { mov dword ptr parm_a, eax} \
__asm { mov dword ptr parm_b, ebx } \
__asm { mov __nextBlock, esi}

#define _ARGS3 \
double *parm_a, *parm_b, *parm_c, *__nextBlock; \
__asm { mov ebp, esp} \
__asm { mov ebp, esp} \
__asm { sub esp, __LOCAL_SIZE } \
__asm { mov dword ptr parm_a, eax} \
__asm { mov dword ptr parm_a, eax} \
__asm { mov dword ptr parm_b, ebx } \
__asm { mov dword ptr parm_c, ecx} \
__asm { mov dword ptr parm_c, ecx} \
__asm { mov __nextBlock, esi }

// Calls with double-typed parameters
Expand Down Expand Up @@ -112,9 +112,9 @@ be sure to preserve edi, too.
__asm { UD2 }

#define _LEAVE \
__asm { mov eax, esi} \
__asm { mov eax, esi} \
__asm { add esi, 8 } \
__asm { mov esp, ebp} \
__asm { mov esp, ebp} \
_MARK_FUNCTION_END

#else // GCC
Expand Down
13 changes: 6 additions & 7 deletions avs/ns-eel/nseel-cfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ NAKED void nseel_asm_invsqrt(void) {

mov edx, 0x5f3759df
fst dword ptr [esi]
// floating point stack has input, as does [eax]
// floating point stack has input, as does [eax]
fmul dword ptr [negativezeropointfive]
mov ecx, [esi]
sar ecx, 1
sub edx, ecx
mov [esi], edx

// st(0) = input, [eax] has x
// st(0) = input, [eax] has x
fmul dword ptr [esi]

fmul dword ptr [esi]
Expand Down Expand Up @@ -717,7 +717,7 @@ NAKED void nseel_asm_and_end(void) {}

//---------------------------------------------------------------------------------------------------------------
NAKED void nseel_asm_uplus(void) // this is the same as doing nothing, it seems
{
{
#if 0
__asm
{
Expand All @@ -731,9 +731,8 @@ NAKED void nseel_asm_uplus(void) // this is the same as doing nothing, it seems
mov nextBlock, ebx
}
#endif
_MARK_FUNCTION_END
_MARK_FUNCTION_END} NAKED void nseel_asm_uplus_end(void) {
}
NAKED void nseel_asm_uplus_end(void) {}

//---------------------------------------------------------------------------------------------------------------
NAKED void nseel_asm_uminus(void) {
Expand Down Expand Up @@ -871,7 +870,7 @@ NAKED void nseel_asm_if(void) {

call eax // call the proper function

// at this point, the return value will be in eax, as desired
// at this point, the return value will be in eax, as desired
}
#else
__asm__ __volatile__(
Expand Down Expand Up @@ -912,7 +911,7 @@ NAKED void nseel_asm_repeat(void) {
again:
push ecx
push esi // revert back to last
// temp workspace
// temp workspace
mov ecx, 0FFFFFFFFh
call ecx
pop esi
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_colorclip.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct ColorClip_Info : public Effect_Info {

class E_ColorClip : public Configurable_Effect<ColorClip_Info, ColorClip_Config> {
public:
E_ColorClip(AVS_Instance* avs) : Configurable_Effect(avs){};
E_ColorClip(AVS_Instance* avs) : Configurable_Effect(avs) {};
virtual ~E_ColorClip() = default;
virtual int render(char visdata[2][2][576],
int is_beat,
Expand Down
4 changes: 2 additions & 2 deletions avs/vis_avs/e_colormap.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ struct ColorMap_Map_Color : public Effect_Config {
int64_t color_id = 0;
static Handles id_factory;

ColorMap_Map_Color() : color_id(id_factory.get()){};
ColorMap_Map_Color() : color_id(id_factory.get()) {};
ColorMap_Map_Color(int64_t position, uint64_t color)
: position(position), color(color), color_id(id_factory.get()){};
: position(position), color(color), color_id(id_factory.get()) {};
};

struct ColorMap_Map : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ void E_Convolution::create_draw_func() {
auto value = ((char)(jloopstart - (this->code_length + 1)));
appenddraw(value);
// this->code_length + 1 is the index of the next command
} // clear mmx state
} // clear mmx state
appenddraw(0x0F); // emms
appenddraw(0x77);
// function exit code
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_convolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
struct Convolution_Kernel_Config : public Effect_Config {
int64_t value = 0;
Convolution_Kernel_Config() = default;
explicit Convolution_Kernel_Config(int64_t value) : value(value){};
explicit Convolution_Kernel_Config(int64_t value) : value(value) {};
};

struct Convolution_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_dotfountain.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
struct DotFountain_Color_Config : public Effect_Config {
uint64_t color = 0xffffff;
DotFountain_Color_Config() = default;
DotFountain_Color_Config(uint64_t color) : color(color){};
DotFountain_Color_Config(uint64_t color) : color(color) {};
};

struct DotFountain_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_dotgrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum DotGrid_Blend_Mode {
struct DotGrid_Color_Config : public Effect_Config {
uint64_t color = 0x000000;
DotGrid_Color_Config() = default;
DotGrid_Color_Config(uint64_t color) : color(color){};
DotGrid_Color_Config(uint64_t color) : color(color) {};
};

struct DotGrid_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_dotplane.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
struct DotPlane_Color_Config : public Effect_Config {
uint64_t color = 0xffffff;
DotPlane_Color_Config() = default;
DotPlane_Color_Config(uint64_t color) : color(color){};
DotPlane_Color_Config(uint64_t color) : color(color) {};
};

struct DotPlane_Config : public Effect_Config {
Expand Down
4 changes: 3 additions & 1 deletion avs/vis_avs/e_eeltrans_translate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class Translator {
Translator(TranslateMode mode,
bool translate_firstlevel,
const std::string& avs_base_path)
: mode(mode), trans_first(translate_firstlevel), avs_base_path(avs_base_path){};
: mode(mode),
trans_first(translate_firstlevel),
avs_base_path(avs_base_path) {};
std::string translate(const std::string& prefix_code, std::string input);
};

Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_interferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class E_Interferences
: public Configurable_Effect<Interferences_Info, Interferences_Config> {
public:
E_Interferences(AVS_Instance* avs);
virtual ~E_Interferences(){};
virtual ~E_Interferences() {};
virtual int render(char visdata[2][2][576],
int is_beat,
int* framebuffer,
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_movement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void Movement_Info::load_effect(Effect* component,

E_Movement::E_Movement(AVS_Instance* avs) : Programmable_Effect(avs) {}
E_Movement::~E_Movement() {}
E_Movement::Transform::Transform() : need_regen(true), lock(lock_init()){};
E_Movement::Transform::Transform() : need_regen(true), lock(lock_init()) {};
E_Movement::Transform::~Transform() {
free(this->table);
lock_destroy(this->lock);
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_oscilloscopestar.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
struct OscilloscopeStar_Color_Config : public Effect_Config {
uint64_t color = 0x000000;
OscilloscopeStar_Color_Config() = default;
OscilloscopeStar_Color_Config(uint64_t color) : color(color){};
OscilloscopeStar_Color_Config(uint64_t color) : color(color) {};
};

struct OscilloscopeStar_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_ring.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
struct Ring_Color_Config : public Effect_Config {
uint64_t color = 0x000000;
Ring_Color_Config() = default;
Ring_Color_Config(uint64_t color) : color(color){};
Ring_Color_Config(uint64_t color) : color(color) {};
};

struct Ring_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_rotstar.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
struct RotStar_Color_Config : public Effect_Config {
uint64_t color = 0x000000;
RotStar_Color_Config() = default;
RotStar_Color_Config(uint64_t color) : color(color){};
RotStar_Color_Config(uint64_t color) : color(color) {};
};

struct RotStar_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_setrendermode.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct SetRenderMode_Info : public Effect_Info {
class E_SetRenderMode
: public Configurable_Effect<SetRenderMode_Info, SetRenderMode_Config> {
public:
E_SetRenderMode(AVS_Instance* avs) : Configurable_Effect(avs){};
E_SetRenderMode(AVS_Instance* avs) : Configurable_Effect(avs) {};
virtual ~E_SetRenderMode() = default;
virtual int render(char visdata[2][2][576],
int is_beat,
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
struct Simple_Color_Config : public Effect_Config {
uint64_t color = 0x000000;
Simple_Color_Config() = default;
Simple_Color_Config(uint64_t color) : color(color){};
Simple_Color_Config(uint64_t color) : color(color) {};
};

struct Simple_Config : public Effect_Config {
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/e_superscope.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
struct SuperScope_Color_Config : public Effect_Config {
uint64_t color = 0x000000;
SuperScope_Color_Config() = default;
SuperScope_Color_Config(uint64_t color) : color(color){};
SuperScope_Color_Config(uint64_t color) : color(color) {};
};

struct SuperScope_Config : public Effect_Config {
Expand Down
4 changes: 2 additions & 2 deletions avs/vis_avs/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ static void rdtsc(unsigned int t[2]) {
__asm
{
mov esi, t
// TODO [cleanup]: This is RDTSC, maybe it wasn't available in MASM at the
// time?
// TODO [cleanup]: This is RDTSC, maybe it wasn't available in MASM at the
// time?
_emit 0xf
_emit 0x31
mov [esi], eax
Expand Down
2 changes: 1 addition & 1 deletion avs/vis_avs/video_libav.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct AVS_Video::LibAV {
SwsContext* scaler = NULL;
bool loaded = false;

LibAV() : loaded(load_libav_dlibs()){};
LibAV() : loaded(load_libav_dlibs()) {};
// TODO [feature][bug]: avs_register_exit_cleanup(this->unload_libav_dlibs);

static const char* load_error;
Expand Down

0 comments on commit a0ed955

Please sign in to comment.