diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/newview/llviewermenufile.cpp | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 118a453e85..8744b06948 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -188,7 +188,7 @@ void LLFilePickerThread::run() void LLFilePickerThread::runModeless() { - BOOL result = FALSE; + bool result = false; LLFilePicker picker; if (mIsSaveDialog) @@ -440,7 +440,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad //now grab the set of valid file extensions std::string valid_extensions = build_extensions_string(type); - BOOL ext_valid = FALSE; + bool ext_valid = false; typedef boost::tokenizer<boost::char_separator<char> > tokenizer; boost::char_separator<char> sep(" "); @@ -451,7 +451,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad //and compare them to the extension of the file //to be uploaded for (token_iter = tokens.begin(); - token_iter != tokens.end() && ext_valid != TRUE; + token_iter != tokens.end() && !ext_valid; ++token_iter) { const std::string& cur_token = *token_iter; @@ -460,11 +460,11 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad { //valid extension //or the acceptable extension is any - ext_valid = TRUE; + ext_valid = true; } }//end for (loop over all tokens) - if (ext_valid == FALSE) + if (!ext_valid) { //should only get here if the extension exists //but is invalid @@ -587,7 +587,7 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification tinygltf::Model model; if (LLTinyGLTFHelper::loadModel(filename, model)) { - S32 materials_in_file = model.materials.size(); + S32 materials_in_file = static_cast<S32>(model.materials.size()); for (S32 i = 0; i < materials_in_file; i++) { @@ -644,7 +644,7 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3 if (LLTinyGLTFHelper::loadModel(filename, model)) { - S32 materials_in_file = model.materials.size(); + S32 materials_in_file = static_cast<S32>(model.materials.size()); for (S32 i = 0; i < materials_in_file; i++) { @@ -756,7 +756,7 @@ class LLFileUploadModel : public view_listener_t bool handleEvent(const LLSD& userdata) { LLFloaterModelPreview::showModelPreview(); - return TRUE; + return true; } }; @@ -765,7 +765,7 @@ class LLFileUploadMaterial : public view_listener_t bool handleEvent(const LLSD& userdata) { LLMaterialEditor::importMaterial(); - return TRUE; + return true; } }; @@ -894,11 +894,11 @@ class LLFileTakeSnapshotToDisk : public view_listener_t S32 width = gViewerWindow->getWindowWidthRaw(); S32 height = gViewerWindow->getWindowHeightRaw(); - BOOL render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot"); - BOOL render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot"); - BOOL render_no_post = gSavedSettings.getBOOL("RenderSnapshotNoPost"); + bool render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot"); + bool render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot"); + bool render_no_post = gSavedSettings.getBOOL("RenderSnapshotNoPost"); - BOOL high_res = gSavedSettings.getBOOL("HighResSnapshot"); + bool high_res = gSavedSettings.getBOOL("HighResSnapshot"); if (high_res) { width *= 2; @@ -911,11 +911,11 @@ class LLFileTakeSnapshotToDisk : public view_listener_t if (gViewerWindow->rawSnapshot(raw, width, height, - TRUE, - FALSE, + true, + false, render_ui, render_hud, - FALSE, + false, render_no_post, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, high_res ? S32_MAX : MAX_SNAPSHOT_IMAGE_SIZE)) //per side @@ -968,7 +968,7 @@ void handle_compress_image(void*) LL_INFOS() << "Input: " << infile << LL_ENDL; LL_INFOS() << "Output: " << outfile << LL_ENDL; - BOOL success; + bool success; success = LLViewerTextureList::createUploadFile(infile, outfile, IMG_CODEC_TGA); @@ -1018,7 +1018,7 @@ void handle_compress_file_test(void*) S64Bytes initial_size = S64Bytes(get_file_size(infile)); - BOOL success; + bool success; F64 total_seconds = LLTimer::getTotalSeconds(); success = gzip_file(infile, packfile); @@ -1112,7 +1112,7 @@ void upload_done_callback( LLResourceData* data = (LLResourceData*)user_data; S32 expected_upload_cost = data ? data->mExpectedUploadCost : 0; //LLAssetType::EType pref_loc = data->mPreferredLocation; - BOOL is_balance_sufficient = TRUE; + bool is_balance_sufficient = true; if(data) { @@ -1130,7 +1130,7 @@ void upload_done_callback( if(!(can_afford_transaction(expected_upload_cost))) { LLBuyCurrencyHTML::openCurrencyFloater( "", expected_upload_cost ); - is_balance_sufficient = FALSE; + is_balance_sufficient = false; } else if(region) { @@ -1291,7 +1291,7 @@ void upload_new_resource( data->mAssetInfo.mType, asset_callback, (void*)data, - FALSE); + false); } } |