azerothcore / azerothcore/mod-premium-lib

compile error

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
4
Forks
8
PR merge metrics
No merged PRs in 30d

Description

azerothcore-wotlk/modules/mod-premium-lib/src/PremiumCommands.cpp:21:17: warning: 'ChatCommand' is deprecated: std::vector should be ChatCommandTable! (using namespace Acore::ChatCommands) [-Wdeprecated-declarations]
std::vector GetCommands() const override
^
/azerothcore-wotlk/src/server/game/Chat/ChatCommands/ChatCommand.h:261:21: note: 'ChatCommand' has been explicitly marked deprecated here
using ChatCommand [[deprecated("std::vector should be ChatCommandTable! (using namespace Acore::ChatCommands)")]] = Acore::ChatCommands::ChatCommandBuilder;
^
/azerothcore-wotlk/modules/mod-premium-lib/src/PremiumCommands.cpp:23:41: fatal error: no matching constructor for initialization of 'std::vector' (aka 'vector')
static std::vector characterCommandTable
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:522:7: note: candidate constructor not viable: cannot convert initializer list argument to 'std::vector::size_type' (aka 'unsigned long')
vector(size_type __n, const value_type& __value,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:585:7: note: candidate constructor not viable: cannot convert initializer list argument to 'std::vector'
vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:589:7: note: candidate constructor not viable: cannot convert initializer list argument to 'std::vector'
vector(vector&& __rv, const allocator_type& __m, false_type)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:653:2: note: candidate template ignored: couldn't infer template argument '_InputIterator'
vector(_InputIterator __first, _InputIterator __last,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:510:7: note: candidate constructor not viable: requires at most 2 arguments, but 3 were provided
vector(size_type __n, const allocator_type& __a = allocator_type())
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:575:7: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
vector(const vector& __x, const allocator_type& __a)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:607:7: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
vector(vector&& __rv, const allocator_type& __m)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:625:7: note: candidate constructor not viable: requires at most 2 arguments, but 3 were provided
vector(initializer_list __l,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:497:7: note: candidate constructor not viable: requires single argument '__a', but 3 arguments were provided
vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:553:7: note: candidate constructor not viable: requires single argument '__x', but 3 arguments were provided
vector(const vector& __x)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:572:7: note: candidate constructor not viable: requires 1 argument, but 3 were provided
vector(vector&&) noexcept = default;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:487:7: note: candidate constructor not viable: requires 0 arguments, but 3 were provided
vector() = default;
^
1 warning and 1 error generated.
gmake[2]: *** [modules/CMakeFiles/modules.dir/build.make:734: modules/CMakeFiles/modules.dir/mod-premium-lib/src/PremiumCommands.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in modules/mod-premium-lib/src/PremiumCommands.cpp at lines 21-23 and read the ChatCommand definition and deprecation note at src/server/game/Chat/ChatCommands/ChatCommand.h:261. Compare the module's command table with the API expected there, then rebuild the module and confirm PremiumCommands.cpp compiles without the reported warning and error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.