aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-04-18 21:51:43 +0200
committerGitHub <[email protected]>2023-04-18 21:51:43 +0200
commit31f5e9544b4ce63c37c4a64b2d8bfac93513efb9 (patch)
tree0cbede3e0a9a2d12f8a4beb0c9026481daad2b69 /zencore/include
parentUpdate README.md (diff)
downloadzen-31f5e9544b4ce63c37c4a64b2d8bfac93513efb9.tar.xz
zen-31f5e9544b4ce63c37c4a64b2d8bfac93513efb9.zip
fix gcc warning about potentially unitialized variable
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/zencore/include/zencore/string.h b/zencore/include/zencore/string.h
index 7ea8c029f..f1ad72665 100644
--- a/zencore/include/zencore/string.h
+++ b/zencore/include/zencore/string.h
@@ -691,7 +691,7 @@ template<Integral T>
std::optional<T>
ParseInt(const std::string_view& Input)
{
- T Out;
+ T Out = 0;
const std::from_chars_result Result = std::from_chars(Input.data(), Input.data() + Input.size(), Out);
if (Result.ec == std::errc::invalid_argument || Result.ec == std::errc::result_out_of_range)
{