Closed VasiliyRyabtsev closed 3 years ago
Using the SQObject& is enough for HashObj() function.
In the following code
RefTable::RefNode *RefTable::Get(SQObject &obj,SQHash &mainpos,RefNode **prev,bool add) { RefNode *ref; mainpos = ::HashObj(obj)&(_numofslots-1);
obj was an SQObject and because HashObj() accepted SQObjectPtr&, a temporary SQObjectPtr was created and refcounting was performed, which only lead to unnecessary overhead.
good catch, thank you.
Using the SQObject& is enough for HashObj() function.
In the following code
obj was an SQObject and because HashObj() accepted SQObjectPtr&, a temporary SQObjectPtr was created and refcounting was performed, which only lead to unnecessary overhead.