msimms / LibIsolationForest

C++, rust, julia, python2, and python3 implementations of the Isolation Forest anomaly detection algorithm.
MIT License
33 stars 11 forks source link

C++ - command line argument compare #9

Open tophe38 opened 3 years ago

tophe38 commented 3 years ago

Hi,

in main.cpp, line 149 and 153, it would be better to use strcmp() instead of strstr() to identify command line argument.


    // Parse the command line arguments.
    for (int i = 1; i < argc; ++i)
    {
        if ((strcmp(argv[i], "outfile") == 0) && (i + 1 < argc))
        {
            outStream.open(argv[i + 1]);
        }
        if (strcmp(argv[i], "dump") == 0)
        {
            dump = true;
        }
    }