MCPcopy Create free account
hub / github.com/ElementsProject/elements / bounded_inc

Function bounded_inc

src/simplicity/bounded.h:22–24  ·  view source on GitHub ↗

x = min(*x + 1, UBOUNDED_MAX) */

Source from the content-addressed store, hash-verified

20
21/* *x = min(*x + 1, UBOUNDED_MAX) */
22static inline void bounded_inc(ubounded* x) {
23 if (*x < UBOUNDED_MAX) (*x)++;
24}
25
26/* 'pad(false, a, b)' computes the PADL(a, b) function.
27 * 'pad( true, a, b)' computes the PADR(a, b) function.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected