You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We face many code duplicates of the following form:
if (!lock)
arbitrary_code();
test(lock);
There seems to be no elegant way to avoid writing the whole thing over and over again, we even have to negate the lock by hand.
My idea would be to enable function pointer as parameters, then we could implement it in the following form:
We face many code duplicates of the following form:
There seems to be no elegant way to avoid writing the whole thing over and over again, we even have to negate the lock by hand.
My idea would be to enable function pointer as parameters, then we could implement it in the following form:
The text was updated successfully, but these errors were encountered: