From 684752e75bdeb58727c2d9b0ff0265d7fcd47de0 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:21:39 +0100 Subject: Replace error checks against `size` with `is_empty` --- core/io/xml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/io/xml_parser.cpp') diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index faf7d75172..06888c7cda 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -454,7 +454,7 @@ bool XMLParser::is_empty() const { } Error XMLParser::open_buffer(const Vector &p_buffer) { - ERR_FAIL_COND_V(p_buffer.size() == 0, ERR_INVALID_DATA); + ERR_FAIL_COND_V(p_buffer.is_empty(), ERR_INVALID_DATA); if (data_copy) { memdelete_arr(data_copy); -- cgit v1.2.3