Cleanup: brace-placement
This commit is contained in:
@@ -287,8 +287,7 @@ const bool GLXEW_ARB_create_context_robustness =
|
||||
attribs[i++] = 0;
|
||||
|
||||
/* Create a GL 3.x context */
|
||||
if (m_fbconfig)
|
||||
{
|
||||
if (m_fbconfig) {
|
||||
m_context = glXCreateContextAttribsARB(m_display, m_fbconfig, s_sharedContext, true, attribs);
|
||||
}
|
||||
else {
|
||||
|
@@ -63,7 +63,7 @@ static bool is_crappy_intel_card()
|
||||
|
||||
GHOST_ContextWGL::GHOST_ContextWGL(
|
||||
bool stereoVisual,
|
||||
bool alphaBackground,
|
||||
bool alphaBackground,
|
||||
GHOST_TUns16 numOfAASamples,
|
||||
HWND hWnd,
|
||||
HDC hDC,
|
||||
@@ -79,7 +79,7 @@ GHOST_ContextWGL::GHOST_ContextWGL(
|
||||
m_contextMajorVersion(contextMajorVersion),
|
||||
m_contextMinorVersion(contextMinorVersion),
|
||||
m_contextFlags(contextFlags),
|
||||
m_alphaBackground(alphaBackground),
|
||||
m_alphaBackground(alphaBackground),
|
||||
m_contextResetNotificationStrategy(contextResetNotificationStrategy),
|
||||
m_hGLRC(NULL)
|
||||
#ifdef WITH_GLEW_MX
|
||||
|
@@ -125,8 +125,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject *pDataObject, DWO
|
||||
*/
|
||||
HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
if (m_window->canAcceptDragOperation())
|
||||
{
|
||||
if (m_window->canAcceptDragOperation()) {
|
||||
*pdwEffect = allowedDropEffect(*pdwEffect);
|
||||
}
|
||||
else {
|
||||
@@ -154,8 +153,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragLeave(void)
|
||||
HRESULT __stdcall GHOST_DropTargetWin32::Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
void *data = getGhostData(pDataObject);
|
||||
if (m_window->canAcceptDragOperation())
|
||||
{
|
||||
if (m_window->canAcceptDragOperation()) {
|
||||
*pdwEffect = allowedDropEffect(*pdwEffect);
|
||||
|
||||
}
|
||||
@@ -189,15 +187,13 @@ GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject *pDataObje
|
||||
* conversion, but we do the conversion ourself with WC_NO_BEST_FIT_CHARS.
|
||||
*/
|
||||
FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
if (pDataObject->QueryGetData(&fmtetc) == S_OK)
|
||||
{
|
||||
if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
|
||||
return GHOST_kDragnDropTypeString;
|
||||
}
|
||||
|
||||
// Filesnames
|
||||
fmtetc.cfFormat = CF_HDROP;
|
||||
if (pDataObject->QueryGetData(&fmtetc) == S_OK)
|
||||
{
|
||||
if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
|
||||
return GHOST_kDragnDropTypeFilenames;
|
||||
}
|
||||
|
||||
|
@@ -167,11 +167,9 @@ void GHOST_EventManager::removeWindowEvents(GHOST_IWindow *window)
|
||||
{
|
||||
TEventStack::iterator iter;
|
||||
iter = m_events.begin();
|
||||
while (iter != m_events.end())
|
||||
{
|
||||
while (iter != m_events.end()) {
|
||||
GHOST_IEvent *event = *iter;
|
||||
if (event->getWindow() == window)
|
||||
{
|
||||
if (event->getWindow() == window) {
|
||||
GHOST_PRINT("GHOST_EventManager::removeWindowEvents(): removing event\n");
|
||||
/*
|
||||
* Found an event for this window, remove it.
|
||||
@@ -191,11 +189,9 @@ void GHOST_EventManager::removeTypeEvents(GHOST_TEventType type, GHOST_IWindow *
|
||||
{
|
||||
TEventStack::iterator iter;
|
||||
iter = m_events.begin();
|
||||
while (iter != m_events.end())
|
||||
{
|
||||
while (iter != m_events.end()) {
|
||||
GHOST_IEvent *event = *iter;
|
||||
if ((event->getType() == type) && (!window || (event->getWindow() == window)))
|
||||
{
|
||||
if ((event->getType() == type) && (!window || (event->getWindow() == window))) {
|
||||
GHOST_PRINT("GHOST_EventManager::removeTypeEvents(): removing event\n");
|
||||
/*
|
||||
* Found an event of this type for the window, remove it.
|
||||
|
@@ -378,8 +378,7 @@ void GHOST_NDOFManager::updateButton(int button_number, bool press, GHOST_TUns64
|
||||
|
||||
NDOF_ButtonT button = (button_number < m_buttonCount) ? m_hidMap[button_number] : NDOF_BUTTON_NONE;
|
||||
|
||||
switch (button)
|
||||
{
|
||||
switch (button) {
|
||||
case NDOF_BUTTON_NONE:
|
||||
#ifdef DEBUG_NDOF_BUTTONS
|
||||
printf("discarded\n");
|
||||
|
@@ -76,8 +76,7 @@ const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *version
|
||||
|
||||
HRESULT hResult = SHGetFolderPathW(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath_16);
|
||||
|
||||
if (hResult == S_OK)
|
||||
{
|
||||
if (hResult == S_OK) {
|
||||
conv_utf_16_to_8(knownpath_16, knownpath, MAX_PATH * 3);
|
||||
strcat(knownpath, "\\Blender Foundation\\Blender\\");
|
||||
strcat(knownpath, versionstr);
|
||||
@@ -94,8 +93,7 @@ const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionst
|
||||
|
||||
HRESULT hResult = SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath_16);
|
||||
|
||||
if (hResult == S_OK)
|
||||
{
|
||||
if (hResult == S_OK) {
|
||||
conv_utf_16_to_8(knownpath_16, knownpath, MAX_PATH * 3);
|
||||
strcat(knownpath, "\\Blender Foundation\\Blender\\");
|
||||
strcat(knownpath, versionstr);
|
||||
|
@@ -1545,8 +1545,7 @@ static bool isStartedFromCommandPrompt()
|
||||
|
||||
int GHOST_SystemWin32::toggleConsole(int action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
switch (action) {
|
||||
case 3: // startup: hide if not started from command prompt
|
||||
{
|
||||
if (isStartedFromCommandPrompt()) {
|
||||
|
@@ -420,8 +420,7 @@ static Bool init_timestamp_scanner(Display *, XEvent *event, XPointer arg)
|
||||
{
|
||||
init_timestamp_data *data =
|
||||
reinterpret_cast<init_timestamp_data *>(arg);
|
||||
switch (event->type)
|
||||
{
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
data->timestamp = event->xbutton.time;
|
||||
@@ -1964,8 +1963,7 @@ int GHOST_X11_ApplicationIOErrorHandler(Display * /*display*/)
|
||||
static bool match_token(const char *haystack, const char *needle)
|
||||
{
|
||||
const char *p, *q;
|
||||
for (p = haystack; *p; )
|
||||
{
|
||||
for (p = haystack; *p; ) {
|
||||
while (*p && isspace(*p))
|
||||
p++;
|
||||
if (!*p)
|
||||
|
Reference in New Issue
Block a user