From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FreeImage/Miranda/main.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/FreeImage/Miranda') diff --git a/plugins/FreeImage/Miranda/main.cpp b/plugins/FreeImage/Miranda/main.cpp index 804e349d7e..8a3d538d4b 100644 --- a/plugins/FreeImage/Miranda/main.cpp +++ b/plugins/FreeImage/Miranda/main.cpp @@ -406,9 +406,9 @@ SetMemIO(FreeImageIO *io) { unsigned __stdcall fiio_mem_ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle) { unsigned x; - for( x=0; x= FIIOMEM(datalen) ) { //if we are at or above 1G, we cant double without going negative - if( FIIOMEM(datalen) & 0x40000000 ) { + if ( FIIOMEM(datalen) & 0x40000000 ) { //max 2G - if( FIIOMEM(datalen) == 0x7FFFFFFF ) { + if ( FIIOMEM(datalen) == 0x7FFFFFFF ) { return 0; } newdatalen = 0x7FFFFFFF; - } else if( FIIOMEM(datalen) == 0 ) { + } else if ( FIIOMEM(datalen) == 0 ) { //default to 4K if nothing yet newdatalen = 4096; } else { @@ -440,7 +440,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun newdatalen = FIIOMEM(datalen) << 1; } newdata = realloc( FIIOMEM(data), newdatalen ); - if( !newdata ) { + if ( !newdata ) { return 0; } FIIOMEM(data) = newdata; @@ -448,7 +448,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun } memcpy( (char *)FIIOMEM(data) + FIIOMEM(curpos), buffer, size*count ); FIIOMEM(curpos) += size*count; - if( FIIOMEM(curpos) > FIIOMEM(filelen) ) { + if ( FIIOMEM(curpos) > FIIOMEM(filelen) ) { FIIOMEM(filelen) = FIIOMEM(curpos); } return count; @@ -458,21 +458,21 @@ int __stdcall fiio_mem_SeekProc(fi_handle handle, long offset, int origin) { switch(origin) { //0 to filelen-1 are 'inside' the file default: case SEEK_SET: //can fseek() to 0-7FFFFFFF always - if( offset >= 0 ) { + if ( offset >= 0 ) { FIIOMEM(curpos) = offset; return 0; } break; case SEEK_CUR: - if( FIIOMEM(curpos)+offset >= 0 ) { + if ( FIIOMEM(curpos)+offset >= 0 ) { FIIOMEM(curpos) += offset; return 0; } break; case SEEK_END: - if( FIIOMEM(filelen)+offset >= 0 ) { + if ( FIIOMEM(filelen)+offset >= 0 ) { FIIOMEM(curpos) = FIIOMEM(filelen)+offset; return 0; } @@ -847,7 +847,7 @@ static INT_PTR serviceGetInterface(WPARAM wParam, LPARAM lParam) { FI_INTERFACE **ppfe = (FI_INTERFACE **)lParam; - if((DWORD)wParam != FI_IF_VERSION) + if ((DWORD)wParam != FI_IF_VERSION) return CALLSERVICE_NOTFOUND; if(ppfe) { @@ -877,7 +877,7 @@ static INT_PTR serviceLoad(WPARAM wParam, LPARAM lParam) } // check that the plugin has reading capabilities ... - if((fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif)) { + if ((fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif)) { // ok, let's load the file FIBITMAP *dib; -- cgit v1.2.3