MCPcopy Create free account
hub / github.com/LUX-Core/lux / Increment

Function Increment

src/cryptopp/integer.cpp:93–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93inline static int Increment(word *A, size_t N, word B=1)
94{
95 CRYPTOPP_ASSERT(N);
96 word t = A[0];
97 A[0] = t+B;
98 if (A[0] >= t)
99 return 0;
100 for (unsigned i=1; i<N; i++)
101 if (++A[i])
102 return 0;
103 return 1;
104}
105
106inline static int Decrement(word *A, size_t N, word B=1)
107{

Callers 1

integer.cppFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected