| 411 | } |
| 412 | |
| 413 | size_t OptState::flush_log(const char* title) { |
| 414 | if (m_owner_optimizer->verbosity() >= 2) { |
| 415 | if (m_log_msg.empty()) { |
| 416 | m_log_msg = mgb_cstr_log(" no var replacement logged"); |
| 417 | } |
| 418 | mgb_log("%s%s", title, m_log_msg.c_str()); |
| 419 | m_log_msg.clear(); |
| 420 | } |
| 421 | auto ret = m_log_nr_item; |
| 422 | m_log_nr_item = 0; |
| 423 | return ret; |
| 424 | } |
| 425 | |
| 426 | void OptState::call_with_opr( |
| 427 | OperatorNodeBase* opr, thin_function<void(void)> func, |