There's so many things wrong with these that I can't even be bothered listing what they are.
First, a simple memory leak:
for(...){ blUtilFindFilesResult * textureBatchFile = new blUtilFindFilesResult( source , target ); textureDirSet.insert( *textureBatchFile );}
Next, an "interesting" way to skip over the "." and ".." directories returned by FindNextFile:
hFindFile = FindFirstFile(inputDirFilename.c_str(), &fileData);char * test;if (!(hFindFile == INVALID_HANDLE_VALUE)) { test = fileData.cFileName; FindNextFile( hFindFile, &fileData); while ( FindNextFile( hFindFile, &fileData) != 0) { test =fileData.cFileName ; inputFileList.append(" "); inputFileList.append(test); }}
And finally:
static char * getDirName( const char * _pInputName, char * _pDirName ){ size_t fileNameLength = strlen(_pInputName); char * filename = ( char* )malloc(fileNameLength+10); strcpy( filename , _pInputName); int dirLength; for( int i = fileNameLength; i > 0; i-- ) { if( filename == '\\' ) { filename = '*';<br> filename = '\<span class="cpp-number">0</span>';<br> dirLength = i+<span class="cpp-number">1</span>;<br> <span class="cpp-keyword">break</span>;<br> }<br> }<br> _pDirName = (<span class="cpp-keyword">char</span> * )malloc( dirLength + <span class="cpp-number">20</span> );<br> strcpy( _pDirName , filename);<br> _pDirName[dirLength] ='\<span class="cpp-number">0</span>';<br><br> <span class="cpp-keyword">return</span> _pDirName;<br><br>}<br><br></pre></div><!–ENDSCRIPT–>Oh god.<br><br>Back to getting rid of the crap…<div>
</div>