]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
CompleMat: Having just one create() method is sufficient
authorMichal Sojka <michal.sojka@cvut.cz>
Sat, 29 Sep 2018 20:26:27 +0000 (22:26 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Sun, 30 Sep 2018 19:22:45 +0000 (21:22 +0200)
The methods differ only in the _n_scales argument, which now takes default
value.

src/complexmat.hpp

index ce939353820b10d55fad5be41e5b0e2dbe92bc90..62f11455eaec518d4fc2ac0c9d3ad5aad239cf17 100644 (file)
@@ -32,16 +32,7 @@ template <typename T> class ComplexMat_ {
         p_data = convert(mat);
     }
 
-    void create(uint _rows, uint _cols, uint _n_channels)
-    {
-        rows = _rows;
-        cols = _cols;
-        n_channels = _n_channels;
-        n_scales = 1;
-        p_data.resize(n_channels * cols * rows);
-    }
-
-    void create(uint _rows, uint _cols, uint _n_channels, uint _n_scales)
+    void create(uint _rows, uint _cols, uint _n_channels, uint _n_scales = 1)
     {
         rows = _rows;
         cols = _cols;