The matlab code is used 0 and 1 as labels therefore the implementation internally uses there labels.
Since the following code 
 SGVector<float64_t> m_lab;
and 
m_lab = ((CBinaryLabels*)lab)->get_labels();
are passed by value, I think such transformation affects internally the class.