MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / safeMax

Function safeMax

src/ast/ast_lint.cpp:175–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 return a + b;
174 }
175 static int safeMax ( int a, int b ) {
176 if ( a == kSuperUnbounded || b == kSuperUnbounded ) return kSuperUnbounded;
177 return a > b ? a : b;
178 }
179 static void mergeExit ( SuperCount & out, int lo, int hi ) {
180 if ( !out.hasExits ) { out.hasExits = true; out.exitLo = lo; out.exitHi = hi; }
181 else { out.exitLo = (lo < out.exitLo) ? lo : out.exitLo; out.exitHi = safeMax(hi, out.exitHi); }

Callers 3

mergeExitFunction · 0.85
countSuperCallsFunction · 0.85
reduceSuperCountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected