Skip to content

Commit 2c0b556

Browse files
committed
fix: tiny improvements
1 parent 6422492 commit 2c0b556

5 files changed

Lines changed: 13 additions & 11 deletions

File tree

include/plugify/config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace plugify {
2828

2929
constexpr Severity DefaultVerbosity
3030
#ifndef NDEBUG
31-
= Severity::Trace
31+
= Severity::Debug
3232
#else
3333
= Severity::Error
3434
#endif

schemas/config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"logSeverity": {
3131
"type": "string",
3232
"description": "Log severity.",
33-
"enum": ["none", "fatal", "error", "warning", "info", "debug", "verbose"]
33+
"enum": ["none", "fatal", "error", "warning", "info", "debug", "trace"]
3434
},
3535
"preferOwnSymbols": {
3636
"type": "boolean",

src/core/config.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,14 @@ Result<void> Config::Validate() const{
237237

238238
for (size_t i = 0; i < pathList.size(); ++i) {
239239
for (size_t j = i + 1; j < pathList.size(); ++j) {
240-
if (*pathList[i].second == *pathList[j].second) {
240+
const auto& [iname, ipath] = pathList[i];
241+
const auto& [jname, jpath] = pathList[j];
242+
if (*ipath == *jpath) {
241243
return MakeError(
242244
"{} and {} directories are the same: {}",
243-
pathList[i].first,
244-
pathList[j].first,
245-
plg::as_string(*pathList[i].second)
245+
iname,
246+
jname,
247+
plg::as_string(*ipath)
246248
);
247249
}
248250
}

src/core/extension.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ using namespace plugify;
88
// Implementation structure
99
struct Extension::Impl {
1010
// Core identity
11-
UniqueId id{ -1 };
12-
ExtensionType type{ ExtensionType::Unknown };
13-
ExtensionState state{ ExtensionState::Unknown };
11+
UniqueId id{};
12+
ExtensionType type{};
13+
ExtensionState state{};
1414

1515
// Runtime state
1616
MethodTable methodTable;

src/core/extension_loader.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ namespace plugify {
101101

102102
// Module Operations
103103
Result<void> LoadModule(Extension& module) {
104-
auto timer = ScopedTimer([&](std::chrono::milliseconds elapsed) {
104+
[[maybe_unused]] auto timer = ScopedTimer([&](std::chrono::milliseconds elapsed) {
105105
_stats.totalLoadTime += elapsed;
106106
if (elapsed > _stats.slowestModuleLoad) {
107107
_stats.slowestModuleLoad = elapsed;
@@ -163,7 +163,7 @@ namespace plugify {
163163

164164
// Plugin Operations
165165
Result<void> LoadPlugin(const Extension& module, Extension& plugin) {
166-
auto timer = ScopedTimer([&](std::chrono::milliseconds elapsed) {
166+
[[maybe_unused]] auto timer = ScopedTimer([&](std::chrono::milliseconds elapsed) {
167167
_stats.totalLoadTime += elapsed;
168168
if (elapsed > _stats.slowestPluginLoad) {
169169
_stats.slowestPluginLoad = elapsed;

0 commit comments

Comments
 (0)