Fix warning in Variant produced by the use of memset.

This commit is contained in:
Martín Lucas Golini
2025-06-10 11:08:11 -03:00
parent ecc0e7451f
commit 6bdb75666d
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -8,7 +8,7 @@ void addJavaScript() {
auto& sd = SyntaxDefinitionManager::instance()->add(
{ "JavaScript",
{ "%.js$" },
{ "%.js$", "%.mjs$" },
{
{ { "//.-\n" }, "comment" },
{ { "/%*", "%*/" }, "comment" },