diff --git a/ccstruct/pdblock.h b/ccstruct/pdblock.h index 1edd9aff..cf29b782 100644 --- a/ccstruct/pdblock.h +++ b/ccstruct/pdblock.h @@ -50,9 +50,7 @@ class PDBLK { void set_sides(ICOORDELT_LIST *left, ICOORDELT_LIST *right); /// destructor - ~PDBLK() { - delete hand_poly; - } + ~PDBLK() { delete hand_poly; } POLY_BLOCK *poly_block() const { return hand_poly; } /// set the poly block diff --git a/ccutil/ambigs.h b/ccutil/ambigs.h index 02686035..faab2198 100644 --- a/ccutil/ambigs.h +++ b/ccutil/ambigs.h @@ -59,8 +59,7 @@ class UnicharIdArrayUtils { // less than length of array2, if any array1[i] is less than array2[i]. // Returns 0 if the arrays are equal, 1 otherwise. // The function assumes that the arrays are terminated by INVALID_UNICHAR_ID. - static inline int compare(const UNICHAR_ID *ptr1, - const UNICHAR_ID *ptr2) { + static inline int compare(const UNICHAR_ID *ptr1, const UNICHAR_ID *ptr2) { for (;;) { const UNICHAR_ID val1 = *ptr1++; const UNICHAR_ID val2 = *ptr2++; diff --git a/classify/trainingsample.cpp b/classify/trainingsample.cpp index a88eb98b..ee6c9d7f 100644 --- a/classify/trainingsample.cpp +++ b/classify/trainingsample.cpp @@ -209,7 +209,7 @@ void TrainingSample::ExtractCharDesc(int int_feature_type, int geo_type, CHAR_DESC_STRUCT* char_desc) { // Extract the INT features. - delete [] features_; + delete[] features_; FEATURE_SET_STRUCT* char_features = char_desc->FeatureSets[int_feature_type]; if (char_features == NULL) { tprintf("Error: no features to train on of type %s\n", @@ -230,7 +230,7 @@ void TrainingSample::ExtractCharDesc(int int_feature_type, } } // Extract the Micro features. - delete [] micro_features_; + delete[] micro_features_; char_features = char_desc->FeatureSets[micro_type]; if (char_features == NULL) { tprintf("Error: no features to train on of type %s\n", diff --git a/dict/dict.h b/dict/dict.h index 5ae20368..31d653af 100644 --- a/dict/dict.h +++ b/dict/dict.h @@ -381,11 +381,11 @@ class Dict { double def_probability_in_context( const char* lang, const char* context, int context_bytes, const char* character, int character_bytes) { - (void) lang; - (void) context; - (void) context_bytes; - (void) character; - (void) character_bytes; + (void)lang; + (void)context; + (void)context_bytes; + (void)character; + (void)character_bytes; return 0.0; } double ngram_probability_in_context(const char* lang, diff --git a/opencl/oclkernels.h b/opencl/oclkernels.h index 010ca661..5a34fb7a 100644 --- a/opencl/oclkernels.h +++ b/opencl/oclkernels.h @@ -1209,6 +1209,6 @@ KERNEL( ; // close char* -#endif // USE_EXTERNAL_KERNEL -#endif //_OCL_KERNEL_H_ +#endif // USE_EXTERNAL_KERNEL +#endif //_OCL_KERNEL_H_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/opencl/openclwrapper.cpp b/opencl/openclwrapper.cpp index 7ca00f35..6554bc70 100644 --- a/opencl/openclwrapper.cpp +++ b/opencl/openclwrapper.cpp @@ -538,11 +538,11 @@ int OpenclDevice::GeneratBinFromKernelSource( cl_program program, const char * c // Release all resouces and memory for ( i = 0; i < numDevices; i++ ) { - free(binaries[i]); - binaries[i] = NULL; + free(binaries[i]); + binaries[i] = NULL; } - free( binaries ); + free(binaries); binaries = NULL; free(binarySizes); @@ -550,7 +550,7 @@ int OpenclDevice::GeneratBinFromKernelSource( cl_program program, const char * c free(mpArryDevsID); mpArryDevsID = NULL; - + return 1; } @@ -1142,7 +1142,7 @@ OpenclDevice::pixReadMemTiffCl(const l_uint8 *data,size_t size,l_int32 n) } if (pagefound == FALSE) { - L_WARNING("tiff page %d not found", procName, i); + L_WARNING("tiff page %d not found\n", procName, i); TIFFCleanup(tif); return NULL; } diff --git a/training/commontraining.cpp b/training/commontraining.cpp index f415198b..57ecdbec 100644 --- a/training/commontraining.cpp +++ b/training/commontraining.cpp @@ -524,8 +524,8 @@ CLUSTERER *SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, } CharID++; } - free( Sample ); - return( Clusterer ); + free(Sample); + return Clusterer; } /* SetUpForClustering */ diff --git a/viewer/scrollview.cpp b/viewer/scrollview.cpp index f10b789e..d4eb6d46 100644 --- a/viewer/scrollview.cpp +++ b/viewer/scrollview.cpp @@ -37,9 +37,9 @@ #include "scrollview.h" #ifdef _MSC_VER -#pragma warning(disable:4786) // Don't give irrelevant warnings for stl -#pragma warning(disable:4018) // signed/unsigned warnings -#pragma warning(disable:4530) // exception warnings +#pragma warning(disable : 4786) // Don't give irrelevant warnings for stl +#pragma warning(disable : 4018) // signed/unsigned warnings +#pragma warning(disable : 4530) // exception warnings #endif const int kSvPort = 8461;