From 49403cbfa0399bb4284ea5c36cc90216a0bda6ff Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Thu, 9 Dec 2021 03:42:46 -0600 Subject: Replace String comparisons with "", String() to is_empty() Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings --- modules/hdr/image_loader_hdr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/hdr') diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp index 32a31aa764..ea28d0c0c8 100644 --- a/modules/hdr/image_loader_hdr.cpp +++ b/modules/hdr/image_loader_hdr.cpp @@ -41,7 +41,7 @@ Error ImageLoaderHDR::load_image(Ref p_image, FileAccess *f, bool p_force while (true) { String line = f->get_line(); ERR_FAIL_COND_V(f->eof_reached(), ERR_FILE_UNRECOGNIZED); - if (line == "") { // empty line indicates end of header + if (line.is_empty()) { // empty line indicates end of header break; } if (line.begins_with("FORMAT=")) { // leave option to implement other commands -- cgit v1.2.3