mycodesucks to Programmer [email protected] • 1 year agoIt's not greatmedia.kbin.socialimagemessage-square66fedilinkarrow-up11.13Karrow-down127file-text
arrow-up11.1Karrow-down1imageIt's not greatmedia.kbin.socialmycodesucks to Programmer [email protected] • 1 year agomessage-square66fedilinkfile-text
minus-square@[email protected]linkfedilinkEnglish11•1 year agoSteadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
minus-square@[email protected]linkfedilink3•edit-21 year agoLaughs in struct LooooongCounter { long highPart; long lowPart; };
minus-square@[email protected]linkfedilink3•1 year agoLooooongCounter operator++(const LooooongCounter& c) { if(c.lowPart == ULONG_MAX) { c.highPart++; c.lowPart = 0; } else c.lowPart++; }
Steadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
Laughs in
struct LooooongCounter { long highPart; long lowPart; };
LooooongCounter operator++(const LooooongCounter& c) { if(c.lowPart == ULONG_MAX) { c.highPart++; c.lowPart = 0; } else c.lowPart++; }