If I take, two objects like that:
firstobject.h:
public slots:
void h_doSomething(int someint, std::vector<int> somevector, bool somebool); //(int)vector.size(): 80;
firstobject.cpp:
void firstobject::h_doSomething(int someint, std::vector<int> somevector, bool somebool)
{
emit anotherSignal(someint+4, somebool, somevector);
}
secondobject.h:
public signals:
void doSomething(int someint, std::vector<int> somevector, bool somebool); //(int)vector.size(): 80;
private:
std::vector< int > m_somevector;
secondobject.cpp:
void secondobject::basicFunction()
{
emit doSomething(51, m_somevector, true);
}
Those signal and slot are connected, what is the best optimisation of these slots and signals?
For the slot, I guess it would be:
void h_doSomething(const int &someint, const std::vector<int> &somevector, const bool &somebool) const;
But for the signals I've no idea, I think the vector need to be copied since it's a protected variable.