Cleanup: clang-format

This commit is contained in:
2020-02-02 11:43:25 +11:00
parent f051d47cdb
commit f48e876459
6 changed files with 21 additions and 23 deletions

View File

@@ -1730,13 +1730,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
NSPoint mousePos = [cocoawindow mouseLocationOutsideOfEventStream];
GHOST_TInt32 x, y;
window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
pushEvent(new GHOST_EventTrackpad([event timestamp] * 1000,
window,
GHOST_kTrackpadEventSmartMagnify,
x,
y,
0,
0));
pushEvent(new GHOST_EventTrackpad(
[event timestamp] * 1000, window, GHOST_kTrackpadEventSmartMagnify, x, y, 0, 0));
} break;
case NSEventTypeRotate: {

View File

@@ -74,8 +74,10 @@
#include "interface_intern.h"
static void icon_draw_rect_input_text(
const rctf *rect, const float color[4], const char *str, int font_size)
static void icon_draw_rect_input_text(const rctf *rect,
const float color[4],
const char *str,
int font_size)
{
BLF_batch_draw_flush();
const int font_id = BLF_default();
@@ -206,8 +208,7 @@ void icon_draw_rect_input(float x,
icon_draw_rect_input_text(&rect, color, (const char[]){'P', 0xe2, 0x86, 0x91, 0x0}, 8);
}
else if (event_type == PAGEDOWNKEY) {
icon_draw_rect_input_text(
&rect, color, (const char[]){'P', 0xe2, 0x86, 0x93, 0x0}, 8);
icon_draw_rect_input_text(&rect, color, (const char[]){'P', 0xe2, 0x86, 0x93, 0x0}, 8);
}
else if (event_type == LEFTARROWKEY) {
icon_draw_rect_input_symbol(&rect, color, (const char[]){0xe2, 0x86, 0x90, 0x0});

View File

@@ -43,11 +43,11 @@
#include "../space_info/textview.h"
static int console_line_data(struct TextViewContext *tvc,
unsigned char fg[4],
unsigned char UNUSED(bg[4]),
int *UNUSED(icon),
unsigned char UNUSED(icon_fg[4]),
unsigned char UNUSED(icon_bg[4]))
unsigned char fg[4],
unsigned char UNUSED(bg[4]),
int *UNUSED(icon),
unsigned char UNUSED(icon_fg[4]),
unsigned char UNUSED(icon_bg[4]))
{
ConsoleLine *cl_iter = (ConsoleLine *)tvc->iter;
int fg_id = TH_TEXT;

View File

@@ -947,7 +947,10 @@ ImBuf *filelist_geticon_image(struct FileList *filelist, const int index)
return filelist_geticon_image_ex(file->typeflag, file->relpath);
}
static int filelist_geticon_ex(FileDirEntry *file, const char *root, const bool is_main, const bool ignore_libdir)
static int filelist_geticon_ex(FileDirEntry *file,
const char *root,
const bool is_main,
const bool ignore_libdir)
{
const int typeflag = file->typeflag;

View File

@@ -43,11 +43,11 @@
#include "GPU_framebuffer.h"
static int report_line_data(struct TextViewContext *tvc,
unsigned char fg[4],
unsigned char bg[4],
int *icon,
unsigned char icon_fg[4],
unsigned char icon_bg[4])
unsigned char fg[4],
unsigned char bg[4],
int *icon,
unsigned char icon_fg[4],
unsigned char icon_bg[4])
{
Report *report = (Report *)tvc->iter;

View File

@@ -160,7 +160,6 @@ static bool console_draw_string(TextViewDrawState *tds,
&tot_lines,
&offsets);
int line_height = (tot_lines * tds->lheight) + (tds->row_vpadding * 2);
int line_bottom = tds->xy[1];
int line_top = line_bottom + line_height;