3131#include " mc/server/commands/CommandContext.h"
3232#include " mc/server/commands/CommandOutputType.h"
3333#include " mc/server/commands/CommandPermissionLevel.h"
34- #include " mc/server/commands/CommandVersion.h"
3534#include " mc/server/commands/CurrentCmdVersion.h"
3635#include " mc/server/commands/GenerateMessageResult.h"
3736#include " mc/server/commands/MinecraftCommands.h"
@@ -423,9 +422,9 @@ Local<Value> CommandClass::newParameter(Arguments const& args) const {
423422 try {
424423 auto name = args[0 ].asString ().toString ();
425424 ParamKind::Kind type = static_cast <ParamKind::Kind>(parseEnum<OldParameterType>(args[1 ]));
426- std::string enumName = " " ;
425+ std::string enumName;
427426 bool optional = false ;
428- std::string identifier = " " ;
427+ std::string identifier;
429428 size_t index = 2 ;
430429 CommandParameterOption option = CommandParameterOption::None;
431430 if (args.size () > index && args[index].isBoolean ()) optional = args[index++].asBoolean ().value ();
@@ -452,8 +451,8 @@ Local<Value> CommandClass::mandatory(Arguments const& args) const {
452451 try {
453452 auto name = args[0 ].asString ().toString ();
454453 ParamKind::Kind type = static_cast <ParamKind::Kind>(parseEnum<OldParameterType>(args[1 ]));
455- std::string enumName = " " ;
456- std::string identifier = " " ;
454+ std::string enumName;
455+ std::string identifier;
457456 size_t index = 2 ;
458457 CommandParameterOption option = CommandParameterOption::None;
459458 if (args.size () > index && args[index].isString ()) enumName = args[index++].asString ().toString ();
@@ -479,8 +478,8 @@ auto CommandClass::optional(Arguments const& args) const -> Local<Value> {
479478 try {
480479 auto name = args[0 ].asString ().toString ();
481480 ParamKind::Kind type = static_cast <ParamKind::Kind>(parseEnum<OldParameterType>(args[1 ]));
482- std::string enumName = " " ;
483- std::string identifier = " " ;
481+ std::string enumName;
482+ std::string identifier;
484483 size_t index = 2 ;
485484 CommandParameterOption option = CommandParameterOption::None;
486485 if (args.size () > index && args[index].isString ()) enumName = args[index++].asString ().toString ();
@@ -751,7 +750,7 @@ Local<Value> CommandClass::removeSoftEnumValues(Arguments const& args) {
751750 auto enums = parseStringList (args[1 ].asArray ());
752751 if (ll::getGamingStatus () == ll::GamingStatus::Starting) {
753752 ll::coro::keepThis ([name, enums]() -> ll::coro::CoroTask<> {
754- CommandRegistrar::getInstance (false ).removeSoftEnumValues (name, std::move ( enums) );
753+ CommandRegistrar::getInstance (false ).removeSoftEnumValues (name, enums);
755754 co_return ;
756755 }).launch (ll::thread::ServerThreadExecutor::getDefault ());
757756 } else {
0 commit comments