Hide redundant options in CECP protocol
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 5 May 2020 17:37:02 +0000 (19:37 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 5 May 2020 17:37:02 +0000 (19:37 +0200)
Avoid conflicting configuration via options
with respective protocol commands (cores, memory, variant).

Closes #119.

src/ucioption.cpp

index e8d9124..0509cb2 100644 (file)
@@ -161,7 +161,8 @@ std::ostream& operator<<(std::ostream& os, const OptionsMap& om) {
   {
       for (size_t idx = 0; idx < om.size(); ++idx)
           for (const auto& it : om)
-              if (it.second.idx == idx && it.first != "Protocol")
+              if (it.second.idx == idx && it.first != "Protocol" && it.first != "UCI_Variant"
+                                       && it.first != "Threads" && it.first != "Hash")
               {
                   const Option& o = it.second;
                   os << "\nfeature option=\"" << it.first << " -" << o.type;