find the safe math function/macro name */
| 322 | |
| 323 | /* find the safe math function/macro name */ |
| 324 | std::string |
| 325 | SafeOpFlags::to_string(enum eBinaryOps op) const |
| 326 | { |
| 327 | if (op_size_ == sFloat) |
| 328 | return safe_float_func_string(op); |
| 329 | string s; |
| 330 | switch (op) { |
| 331 | case eAdd: s = "safe_add_"; break; |
| 332 | case eSub: s = "safe_sub_"; break; |
| 333 | case eMul: s = "safe_mul_"; break; |
| 334 | case eMod: s = "safe_mod_"; break; |
| 335 | case eDiv: s = "safe_div_"; break; |
| 336 | case eLShift: s = "safe_lshift_"; break; |
| 337 | case eRShift: s = "safe_rshift_"; break; |
| 338 | default: break; |
| 339 | } |
| 340 | ostringstream oss; |
| 341 | OutputFuncOrMacro(oss); |
| 342 | OutputSize(oss); |
| 343 | OutputOp1(oss); |
| 344 | (op == eLShift || op == eRShift) ? OutputOp2(oss) : OutputOp1(oss); |
| 345 | s += oss.str(); |
| 346 | return s; |
| 347 | } |
| 348 | |
| 349 | /* find the safe math function/macro name */ |
| 350 | std::string |
nothing calls this directly
no outgoing calls
no test coverage detected