From 6bdb75666d68cdae24ecad41fb5cf7c83f6d1cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 10 Jun 2025 11:08:11 -0300 Subject: [PATCH] Fix warning in Variant produced by the use of memset. --- include/eepp/ui/models/variant.hpp | 4 ++-- src/eepp/ui/doc/languages/javascript.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/eepp/ui/models/variant.hpp b/include/eepp/ui/models/variant.hpp index 340df47ff..ff8ad7c3f 100644 --- a/include/eepp/ui/models/variant.hpp +++ b/include/eepp/ui/models/variant.hpp @@ -117,7 +117,7 @@ class EE_API Variant { mValue( other.mValue ), mType( other.mType ), mOwnsObject( other.mOwnsObject ) { other.mType = Type::Invalid; other.mOwnsObject = false; - std::memset( &other.mValue, 0, sizeof( mValue ) ); + other.mValue = {}; } Variant& operator=( const Variant& other ) { @@ -136,7 +136,7 @@ class EE_API Variant { mValue = other.mValue; other.mType = Type::Invalid; other.mOwnsObject = false; - std::memset( &other.mValue, 0, sizeof( mValue ) ); + other.mValue = {}; } return *this; } diff --git a/src/eepp/ui/doc/languages/javascript.cpp b/src/eepp/ui/doc/languages/javascript.cpp index 48a933a98..a40d95375 100644 --- a/src/eepp/ui/doc/languages/javascript.cpp +++ b/src/eepp/ui/doc/languages/javascript.cpp @@ -8,7 +8,7 @@ void addJavaScript() { auto& sd = SyntaxDefinitionManager::instance()->add( { "JavaScript", - { "%.js$" }, + { "%.js$", "%.mjs$" }, { { { "//.-\n" }, "comment" }, { { "/%*", "%*/" }, "comment" },