I'm looking to DRY out the following C code:
if (i < SIZE_OF_V) {
if (V[i])
K = V[d];
else
K = V[d] = (expensive complicated call);
} else {
K = (expensive complicated call);
}
Any advice? A local macro would work, but I'd prefer a more modern alternative.