Skip to content

Commit

Permalink
Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Nov 22, 2023
1 parent 3ccb896 commit abfbefb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
shmuel 2023-11-22 20:50:01+02:00 - build 6215

1. Warnings.

--------------------------------------------------------------------------------
shmuel 2023-11-21 20:32:53+02:00 - build 6214

Expand Down
22 changes: 11 additions & 11 deletions far/macro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3521,36 +3521,36 @@ void FarMacroApi::fargetconfigFunc() const
const wchar_t *Keyname = (mData->Count >= 1 && mData->Values[0].Type==FMVT_STRING) ?
mData->Values[0].String : L"";

auto Dot = wcsrchr(Keyname, L'.');
const auto Dot = wcsrchr(Keyname, L'.');
if (Dot)
{
string Key(Keyname, Dot - Keyname);
const string_view Key(Keyname, Dot - Keyname);

if (const auto option = Global->Opt->GetConfigValue(Key.c_str(), Dot+1))
if (const auto option = Global->Opt->GetConfigValue(Key, Dot+1))
{
if (const auto Opt = dynamic_cast<const BoolOption*>(option))
if (const auto OptBool = dynamic_cast<const BoolOption*>(option))
{
PassBoolean(Opt->Get());
PassBoolean(OptBool->Get());
PassValue(L"boolean");
}
else if (const auto Opt = dynamic_cast<const Bool3Option*>(option))
else if (const auto OptBool3 = dynamic_cast<const Bool3Option*>(option))
{
auto Val = Opt->Get();
auto Val = OptBool3->Get();
if (Val == 0 || Val == 1)
PassBoolean(Val == 1);
else
PassValue(L"other");

PassValue(L"3-state");
}
else if (const auto Opt = dynamic_cast<const IntOption*>(option))
else if (const auto OptInt = dynamic_cast<const IntOption*>(option))
{
PassValue(Opt->Get());
PassValue(OptInt->Get());
PassValue(L"integer");
}
else if (const auto Opt = dynamic_cast<const StringOption*>(option))
else if (const auto OptString = dynamic_cast<const StringOption*>(option))
{
PassValue(Opt->Get());
PassValue(OptString->Get());
PassValue(L"string");
}
else
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6214
6215

0 comments on commit abfbefb

Please sign in to comment.