Skip to content

Commit 0ad8a80

Browse files
committed
chore: very very minor sv additions
1 parent 49a0940 commit 0ad8a80

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

Addictol/Source/Modules/AdModuleDpiScaling.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ namespace Addictol
6969

7070
bool ModuleDpiScaling::DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg) noexcept
7171
{
72-
const char* level = nullptr;
72+
std::string level = "";
7373
if (detail::TrySetPerMonitorV2())
74-
level = "PER_MONITOR_AWARE_V2";
74+
level = "PER_MONITOR_AWARE_V2"sv;
7575
else if (detail::TrySetPerMonitor())
76-
level = "PROCESS_PER_MONITOR_DPI_AWARE";
76+
level = "PROCESS_PER_MONITOR_DPI_AWARE"sv;
7777
else if (detail::TrySetDpiAware())
78-
level = "DPI_AWARE";
78+
level = "DPI_AWARE"sv;
7979

80-
if (level)
80+
if (!level.empty())
8181
REX::INFO("DPI Scaling: applied {}"sv, level);
8282
else
8383
REX::WARN("DPI Scaling: no SetProcessDpi* entry point accepted; process remains DPI-unaware"sv);

Addictol/Source/Modules/AdModulePipBoyCursorConstraints.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ namespace Addictol
4343
static REL::Relocation<std::uint32_t*> PipboyConstraintWidth_PowerArmor{ RE::ID::MenuCursor::PipboyConstraintWidth_PowerArmor };
4444
static REL::Relocation<std::uint32_t*> PipboyConstraintHeight_PowerArmor{ RE::ID::MenuCursor::PipboyConstraintHeight_PowerArmor };
4545

46-
inline void LogPipBoyConstraints(std::string a_title, std::uint32_t a_tlx, std::uint32_t a_tly, std::uint32_t a_width, std::uint32_t a_height) noexcept
46+
inline void LogPipBoyConstraints(std::string_view a_title, std::uint32_t a_tlx, std::uint32_t a_tly, std::uint32_t a_width, std::uint32_t a_height) noexcept
4747
{
4848
#if !AD_NOMESSAGE_PIPBOY_CURSOR_CONSTRAINTS
49-
REX::INFO("{}", a_title);
50-
REX::INFO("TLX: {}", a_tlx);
51-
REX::INFO("TLY: {}", a_tly);
52-
REX::INFO("Width: {}", a_width);
53-
REX::INFO("Height: {}", a_height);
49+
REX::INFO("{}"sv, a_title);
50+
REX::INFO("TLX: {}"sv, a_tlx);
51+
REX::INFO("TLY: {}"sv, a_tly);
52+
REX::INFO("Width: {}"sv, a_width);
53+
REX::INFO("Height: {}"sv, a_height);
5454
#endif
5555
}
5656

@@ -67,13 +67,13 @@ namespace Addictol
6767
// Fail if we couldn't get the Settings
6868
if (!uPipboyTargetWidth || !uPipboyTargetHeight)
6969
{
70-
REX::WARN("Could not get one of the uPipboyTargetWidth/Height settings!");
70+
REX::WARN("Could not get one of the uPipboyTargetWidth/Height settings!"sv);
7171
return false;
7272
}
7373

7474
#if !AD_NOMESSAGE_PIPBOY_CURSOR_CONSTRAINTS
7575
// Log PipBoy Resolution
76-
REX::INFO("PipBoy Resolution: {}x{}", uPipboyTargetWidth->GetUInt(), uPipboyTargetHeight->GetUInt());
76+
REX::INFO("PipBoy Resolution: {}x{}"sv, uPipboyTargetWidth->GetUInt(), uPipboyTargetHeight->GetUInt());
7777
#endif
7878

7979
return true;
@@ -90,8 +90,8 @@ namespace Addictol
9090
const float heightFactor = (float)uPipboyTargetHeight->GetUInt() / defaultPipboyTargetHeight;
9191

9292
// Log before updating PipBoy Constraints
93-
LogPipBoyConstraints("PipBoy Constraints Pre-Update:", *PipboyConstraintTLX, *PipboyConstraintTLY, *PipboyConstraintWidth, *PipboyConstraintHeight);
94-
LogPipBoyConstraints("PA PipBoy Constraints Pre-Update:", *PipboyConstraintTLX_PowerArmor, *PipboyConstraintTLY_PowerArmor, *PipboyConstraintWidth_PowerArmor, *PipboyConstraintHeight_PowerArmor);
93+
LogPipBoyConstraints("PipBoy Constraints Pre-Update:"sv, *PipboyConstraintTLX, *PipboyConstraintTLY, *PipboyConstraintWidth, *PipboyConstraintHeight);
94+
LogPipBoyConstraints("PA PipBoy Constraints Pre-Update:"sv, *PipboyConstraintTLX_PowerArmor, *PipboyConstraintTLY_PowerArmor, *PipboyConstraintWidth_PowerArmor, *PipboyConstraintHeight_PowerArmor);
9595

9696
// Update PipBoy Constraints
9797
*PipboyConstraintTLX = static_cast<std::uint32_t>(std::ceil(defaultPipboyConstraintTLX * widthFactor));
@@ -106,8 +106,8 @@ namespace Addictol
106106
*PipboyConstraintHeight_PowerArmor = static_cast<std::uint32_t>(std::ceil(defaultPipboyConstraintHeight_PowerArmor * heightFactor));
107107

108108
// Log after updating PipBoy Constraints
109-
LogPipBoyConstraints("PipBoy Constraints Post-Update:", *PipboyConstraintTLX, *PipboyConstraintTLY, *PipboyConstraintWidth, *PipboyConstraintHeight);
110-
LogPipBoyConstraints("PA PipBoy Constraints Post-Update:", *PipboyConstraintTLX_PowerArmor, *PipboyConstraintTLY_PowerArmor, *PipboyConstraintWidth_PowerArmor, *PipboyConstraintHeight_PowerArmor);
109+
LogPipBoyConstraints("PipBoy Constraints Post-Update:"sv, *PipboyConstraintTLX, *PipboyConstraintTLY, *PipboyConstraintWidth, *PipboyConstraintHeight);
110+
LogPipBoyConstraints("PA PipBoy Constraints Post-Update:"sv, *PipboyConstraintTLX_PowerArmor, *PipboyConstraintTLY_PowerArmor, *PipboyConstraintWidth_PowerArmor, *PipboyConstraintHeight_PowerArmor);
111111

112112
return true;
113113
}

Addictol/Source/Modules/AdModuleToggleGrassCommand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Addictol
1919

2020
bool ModuleToggleGrassCommand::DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg) noexcept
2121
{
22-
RE::SCRIPT_FUNCTION* consoleCommand = RE::SCRIPT_FUNCTION::LocateConsoleCommand("ToggleGrass");
22+
RE::SCRIPT_FUNCTION* consoleCommand = RE::SCRIPT_FUNCTION::LocateConsoleCommand("ToggleGrass"sv);
2323
if (consoleCommand)
2424
{
2525
bool isReferenceFunction = false;

Version/build_version.txt

0 Bytes
Binary file not shown.

Version/resource_version2.h

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)