stan-dev/stan

Clean up code: `.str().length()`

开放

#2,577 创建于 2018年7月10日

 (13 条评论) (0 个反应) (1 位负责人)C++ (387 个派生)batch import
code cleanupgood first issue

仓库指标

星标
 (2,761 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Summary:

There are many instances of code that looks like:

if (msg.str().length() > 0)
  logger.info(msg);

We should either:

  • have the info() method ignore empty messages in general
  • wrap the call in a function

Additional Information:

Originally from this PR comment: https://github.com/stan-dev/stan/pull/2570#discussion_r201151286

Current Version:

v2.17.1

贡献者指南