From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/llfilepicker.cpp | 140 ++++++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 70 deletions(-) (limited to 'indra/newview/llfilepicker.cpp') diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 4ad136e13a..3d202cc731 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -168,9 +168,9 @@ void LLFilePicker::reset() #if LL_WINDOWS -BOOL LLFilePicker::setupFilter(ELoadFilter filter) +bool LLFilePicker::setupFilter(ELoadFilter filter) { - BOOL res = TRUE; + bool res = true; switch (filter) { case FFLOAD_ALL: @@ -237,24 +237,24 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) L"\0"; break; default: - res = FALSE; + res = false; break; } return res; } -BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) +bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) { if( mLocked ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } // don't provide default file selection @@ -294,27 +294,27 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) return success; } -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) { if( mLocked ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } // don't provide default file selection @@ -380,27 +380,27 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) return success; } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) +bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) { if( mLocked ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } mOFN.lpstrFile = mFilesW; @@ -566,7 +566,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, mOFN.lpstrFilter = L"LSL Files (*.lsl)\0*.lsl\0" L"\0"; break; default: - return FALSE; + return false; } @@ -609,14 +609,14 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, return success; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } #elif LL_DARWIN @@ -873,17 +873,17 @@ bool LLFilePicker::doNavSaveDialogModeless(ESaveFilter filter, return true; } -BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) +bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) { if( mLocked ) - return FALSE; + return false; - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -929,17 +929,17 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) } -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { if( mLocked ) - return FALSE; + return false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -962,18 +962,18 @@ BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, return doNavChooseDialogModeless(filter, callback, userdata); } -BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) { if( mLocked ) - return FALSE; + return false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; reset(); @@ -1008,17 +1008,17 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { if( mLocked ) - return FALSE; + return false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -1030,12 +1030,12 @@ BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, return doNavChooseDialogModeless(filter, callback, userdata); } -BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) +bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) { if( mLocked ) return false; - BOOL success = false; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) @@ -1071,7 +1071,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, return success; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) @@ -1360,14 +1360,14 @@ static std::string add_save_texture_filter_to_gtkchooser(GtkWindow *picker) return caption; } -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { - BOOL rtn = FALSE; + bool rtn = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } gViewerWindow->getWindow()->beforeDialog(); @@ -1477,14 +1477,14 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, return rtn; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) +bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { - BOOL rtn = FALSE; + bool rtn = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } gViewerWindow->getWindow()->beforeDialog(); @@ -1542,14 +1542,14 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) return rtn; } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { - BOOL rtn = FALSE; + bool rtn = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } gViewerWindow->getWindow()->beforeDialog(); @@ -1580,13 +1580,13 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) // Hacky stubs designed to facilitate fake getSaveFile and getOpenFile with // static results, when we don't have a real filepicker. -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -1596,27 +1596,27 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, if (!filename.empty()) { mFiles.push_back(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename); - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) { LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) +bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -1632,58 +1632,58 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) } mFiles.push_back(filename); LL_INFOS() << "getOpenFile: Will try to open file: " << filename << LL_ENDL; - return TRUE; + return true; } -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } #endif // LL_GTK #else // not implemented -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) { reset(); - return FALSE; + return false; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter ) +bool LLFilePicker::getOpenFile( ELoadFilter filter ) { reset(); - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { reset(); - return FALSE; + return false; } #endif // LL_LINUX -- cgit v1.2.3