Fixes spacing for "for", "while", "switch" and "if"

Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
This commit is contained in:
Matthew Parlane
2014-03-11 00:30:55 +13:00
parent 4591464486
commit 31cfc73a09
189 changed files with 1250 additions and 1159 deletions

View File

@ -97,8 +97,8 @@ void cInterfaceAGL::Update()
size.width *= scale;
size.height *= scale;
if( s_backbuffer_width == size.width
&& s_backbuffer_height == size.height)
if (s_backbuffer_width == size.width &&
s_backbuffer_height == size.height)
return;
s_backbuffer_width = size.width;

View File

@ -93,7 +93,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
const char *s;
EGLint egl_major, egl_minor;
if(!Platform.SelectDisplay())
if (!Platform.SelectDisplay())
return false;
GLWin.egl_dpy = Platform.EGLGetDisplay();
@ -131,7 +131,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
switch(s_opengl_mode)
switch (s_opengl_mode)
{
case MODE_OPENGL:
attribs[1] = EGL_OPENGL_BIT;
@ -212,11 +212,11 @@ void cInterfaceEGL::Shutdown()
if (GLWin.egl_ctx)
{
eglMakeCurrent(GLWin.egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if(!eglDestroyContext(GLWin.egl_dpy, GLWin.egl_ctx))
if (!eglDestroyContext(GLWin.egl_dpy, GLWin.egl_ctx))
NOTICE_LOG(VIDEO, "Could not destroy drawing context.");
if(!eglDestroySurface(GLWin.egl_dpy, GLWin.egl_surf))
if (!eglDestroySurface(GLWin.egl_dpy, GLWin.egl_surf))
NOTICE_LOG(VIDEO, "Could not destroy window surface.");
if(!eglTerminate(GLWin.egl_dpy))
if (!eglTerminate(GLWin.egl_dpy))
NOTICE_LOG(VIDEO, "Could not destroy display connection.");
GLWin.egl_ctx = nullptr;
}

View File

@ -161,7 +161,7 @@ void cX11Window::XEventThread()
for (int num_events = XPending(GLWin.evdpy); num_events > 0; num_events--)
{
XNextEvent(GLWin.evdpy, &event);
switch(event.type) {
switch (event.type) {
case ConfigureNotify:
GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);
break;