adapt: adapt to GMLIB 0.13.1
adapt: adapt to GMLIB 0.13.1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Diagnostics:
|
Diagnostics:
|
||||||
Suppress: ["-Wmicrosoft-enum-forward-reference", "-Wc++11-narrowing", "-Wc++2b-extensions", "-Wmicrosoft-cast"]
|
Suppress: ["-Wmicrosoft-enum-forward-reference", "-Wc++11-narrowing", "-Wc++2b-extensions", "-Wmicrosoft-cast"]
|
||||||
CompileFlags:
|
CompileFlags:
|
||||||
Add: ["-ferror-limit=0", "-D__FUNCTION__=\"dummy\"", "-D_CRT_USE_BUILTIN_OFFSETOF", "-std:c++latest"]
|
Add: ["-ferror-limit=0", "-D__FUNCTION__=\"dummy\"", "-D_CRT_USE_BUILTIN_OFFSETOF", "-std=c++23"]
|
||||||
Remove: ["/Yu_HeaderOutputPredefine.h", "/FI_HeaderOutputPredefine.h"]
|
Remove: ["/Yu_HeaderOutputPredefine.h", "/FI_HeaderOutputPredefine.h"]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: xmake-io/github-action-setup-xmake@v1
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
with:
|
with:
|
||||||
xmake-version: branch@master
|
xmake-version: latest
|
||||||
- run: |
|
- run: |
|
||||||
xmake repo -u
|
xmake repo -u
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: xmake-io/github-action-setup-xmake@v1
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
with:
|
with:
|
||||||
xmake-version: branch@master
|
xmake-version: latest
|
||||||
- run: |
|
- run: |
|
||||||
xmake repo -u
|
xmake repo -u
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -44,8 +44,8 @@ ServerTimeScheduler& Entry::getScheduler() { return mScheduler.value(); }
|
|||||||
|
|
||||||
} // namespace Cleaner
|
} // namespace Cleaner
|
||||||
|
|
||||||
LL_REGISTER_PLUGIN(Cleaner::Entry, Cleaner::instance);
|
LL_REGISTER_MOD(Cleaner::Entry, Cleaner::instance);
|
||||||
|
|
||||||
std::string tr(std::string const& key, std::vector<std::string> const& params) {
|
std::string tr(std::string const& key, std::vector<std::string> const& params) {
|
||||||
return I18nAPI::get(key, params, Cleaner::Entry::getInstance().getConfig().language);
|
return I18nAPI::get(key, params, Cleaner::Entry::getInstance().getConfig().language);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include <ll/api/plugin/NativePlugin.h>
|
#include <ll/api/mod/NativeMod.h>
|
||||||
#include <ll/api/schedule/Scheduler.h>
|
#include <ll/api/schedule/Scheduler.h>
|
||||||
|
|
||||||
namespace Cleaner {
|
namespace Cleaner {
|
||||||
@@ -13,9 +13,9 @@ class Entry {
|
|||||||
public:
|
public:
|
||||||
static Entry& getInstance();
|
static Entry& getInstance();
|
||||||
|
|
||||||
Entry(ll::plugin::NativePlugin& self) : mSelf(self) {}
|
Entry(ll::mod::NativeMod& self) : mSelf(self) {}
|
||||||
|
|
||||||
[[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; }
|
[[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; }
|
||||||
|
|
||||||
/// @return True if the plugin is loaded successfully.
|
/// @return True if the plugin is loaded successfully.
|
||||||
bool load();
|
bool load();
|
||||||
@@ -37,9 +37,9 @@ public:
|
|||||||
ServerTimeScheduler& getScheduler();
|
ServerTimeScheduler& getScheduler();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ll::plugin::NativePlugin& mSelf;
|
ll::mod::NativeMod& mSelf;
|
||||||
std::optional<Config> mConfig;
|
std::optional<Config> mConfig;
|
||||||
std::optional<ServerTimeScheduler> mScheduler;
|
std::optional<ServerTimeScheduler> mScheduler;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Cleaner
|
} // namespace Cleaner
|
||||||
|
|||||||
Reference in New Issue
Block a user