reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 09ee3aa19b8abedb84797b1254bdcb9caa037561
parent 50b6fcee63efad5960b53d5b7bfa38727ceb21ee
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 20 Jan 2019 09:35:18 -0500

fix build with boost 1.69.0

tribool's bool conversion operator is now explicit

Diffstat:
Msrc/manager.cpp | 6++----
Msrc/remote.cpp | 2+-
Mtest/remote.cpp | 2+-
3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/manager.cpp b/src/manager.cpp @@ -375,10 +375,8 @@ bool Manager::isRemoteEnabled(const Remote &remote) const void Manager::setRemoteAutoInstall(const tribool &enabled) { setMods([=](const Remote &remote, int, RemoteMods *mods) { - const bool same = remote.autoInstall() == enabled - || (indeterminate(remote.autoInstall()) && indeterminate(enabled)); - - if(same) + if(remote.autoInstall() == enabled + || (indeterminate(remote.autoInstall()) && indeterminate(enabled))) mods->autoInstall = nullopt; else mods->autoInstall = enabled; diff --git a/src/remote.cpp b/src/remote.cpp @@ -125,7 +125,7 @@ bool Remote::autoInstall(bool fallback) const if(boost::logic::indeterminate(m_autoInstall)) return fallback; else - return m_autoInstall; + return bool{m_autoInstall}; } string Remote::toString() const diff --git a/test/remote.cpp b/test/remote.cpp @@ -266,7 +266,7 @@ TEST_CASE("unserialize remote", M) { SECTION("auto-install enabled") { Remote remote = Remote::fromString("name|url|1|0"); - REQUIRE(remote.autoInstall() == false); + REQUIRE(bool{remote.autoInstall() == false}); } }