[mlpack-git] master: add more descriptions (92f3cd1)
gitdub at mlpack.org
gitdub at mlpack.org
Tue Jun 7 00:50:22 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/4fa39b6ab0baa1428116d0406264b5452e716d06...97402b9098d9d72889aa795923cf8fd67a4d87bf
>---------------------------------------------------------------
commit 92f3cd11d129367ba1b48d79b3081409ae80707a
Author: Keon Kim <kwk236 at gmail.com>
Date: Tue Jun 7 13:50:22 2016 +0900
add more descriptions
>---------------------------------------------------------------
92f3cd11d129367ba1b48d79b3081409ae80707a
src/mlpack/core/util/cli_impl.hpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mlpack/core/util/cli_impl.hpp b/src/mlpack/core/util/cli_impl.hpp
index 4e8638a..882382e 100644
--- a/src/mlpack/core/util/cli_impl.hpp
+++ b/src/mlpack/core/util/cli_impl.hpp
@@ -43,10 +43,15 @@ void CLI::Add(const std::string& identifier,
const std::string& alias,
bool required)
{
+ // Temporary outstream object for detecting duplicate identifiers
util::PrefixedOutStream outstr(std::cerr,
BASH_RED "[FATAL] " BASH_CLEAR, false, true /* fatal */);
+
+ // identifier and alias maps
gmap_t& gmap = GetSingleton().globalValues;
amap_t& amap = GetSingleton().aliasValues;
+
+ // if found in current map, print fatal error and terminat program.
if (gmap.count(identifier))
outstr << "Parameter --" << identifier << "(-" << alias << ") "
<< "is defined multiple times with same identifiers." << std::endl;
More information about the mlpack-git
mailing list