Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-12 02:12:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-12 02:12:32 +0400
commitb96c6220157807cbfa3568031d5ab688280fe1d6 (patch)
treeb357c12ac0d629577a7711769dcec4f410293ee4 /intern/ghost
parentc567cf3fab5b962a4166ef44f45c80941021b60d (diff)
style cleanup
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp3
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm8
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm20
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp4
4 files changed, 19 insertions, 16 deletions
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 4cdd9384eee..bb6c90cd431 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -860,7 +860,8 @@ int GHOST_toggleConsole(int action)
}
-int GHOST_confirmQuit(GHOST_WindowHandle windowhandle){
+int GHOST_confirmQuit(GHOST_WindowHandle windowhandle)
+{
GHOST_ISystem *system = GHOST_ISystem::getSystem();
return system->confirmQuit((GHOST_IWindow *) windowhandle);
}
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 9f08f4cff80..1bffbc8eb85 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1662,17 +1662,19 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
case NSKeyDown:
case NSKeyUp:
charsIgnoringModifiers = [event charactersIgnoringModifiers];
- if ([charsIgnoringModifiers length]>0)
+ if ([charsIgnoringModifiers length] > 0) {
keyCode = convertKey([event keyCode],
[charsIgnoringModifiers characterAtIndex:0],
[event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
- else
+ }
+ else {
keyCode = convertKey([event keyCode],0,
[event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
+ }
/* handling both unicode or ascii */
characters = [event characters];
- if ([characters length]>0) {
+ if ([characters length] > 0) {
convertedCharacters = [characters dataUsingEncoding:NSUTF8StringEncoding];
for (int x = 0; x < [convertedCharacters length]; x++) {
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index ac6cc548f32..31f91802e38 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -502,7 +502,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
if (stereoVisual) pixelFormatAttrsWindow[i++] = NSOpenGLPFAStereo;
- if (numOfAASamples>0) {
+ if (numOfAASamples > 0) {
// Multisample anti-aliasing
pixelFormatAttrsWindow[i++] = NSOpenGLPFAMultisample;
@@ -550,7 +550,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
}
- if (numOfAASamples>0) { //Set m_numOfAASamples to the actual value
+ if (numOfAASamples > 0) { //Set m_numOfAASamples to the actual value
GLint gli;
[pixelFormat getValues:&gli forAttribute:NSOpenGLPFASamples forVirtualScreen:0];
if (m_numOfAASamples != (GHOST_TUns16)gli) {
@@ -653,7 +653,7 @@ void GHOST_WindowCocoa::setTitle(const STR_String& title)
fileStrRange.location = [windowTitle rangeOfString:@"["].location+1;
len = [windowTitle rangeOfString:@"]"].location - fileStrRange.location;
- if (len >0)
+ if (len > 0)
{
fileStrRange.length = len;
associatedFileName = [windowTitle substringWithRange:fileStrRange];
@@ -1424,9 +1424,9 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorShape(GHOST_TStandardCursor sha
/** Reverse the bits in a GHOST_TUns8
static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
{
- ch= ((ch>>1)&0x55) | ((ch<<1)&0xAA);
- ch= ((ch>>2)&0x33) | ((ch<<2)&0xCC);
- ch= ((ch>>4)&0x0F) | ((ch<<4)&0xF0);
+ ch= ((ch >> 1) & 0x55) | ((ch << 1) & 0xAA);
+ ch= ((ch >> 2) & 0x33) | ((ch << 2) & 0xCC);
+ ch= ((ch >> 4) & 0x0F) | ((ch << 4) & 0xF0);
return ch;
}
*/
@@ -1435,10 +1435,10 @@ static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
/** Reverse the bits in a GHOST_TUns16 */
static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
{
- shrt= ((shrt>>1)&0x5555) | ((shrt<<1)&0xAAAA);
- shrt= ((shrt>>2)&0x3333) | ((shrt<<2)&0xCCCC);
- shrt= ((shrt>>4)&0x0F0F) | ((shrt<<4)&0xF0F0);
- shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00);
+ shrt = ((shrt >> 1) & 0x5555) | ((shrt << 1) & 0xAAAA);
+ shrt = ((shrt >> 2) & 0x3333) | ((shrt << 2) & 0xCCCC);
+ shrt = ((shrt >> 4) & 0x0F0F) | ((shrt << 4) & 0xF0F0);
+ shrt = ((shrt >> 8) & 0x00FF) | ((shrt << 8) & 0xFF00);
return shrt;
}
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 3dc10d17169..17efecb4a82 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -1314,8 +1314,8 @@ validate()
*/
GHOST_WindowX11::
-~GHOST_WindowX11(
- ){
+~GHOST_WindowX11()
+{
static Atom Primary_atom, Clipboard_atom;
Window p_owner, c_owner;
/*Change the owner of the Atoms to None if we are the owner*/