stan-dev/stan

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

オープン

#2,577 opened on 2018/07/10

 (13 件のコメント) (0 件のリアクション) (1 人の担当者)C++ (387 件のフォーク)batch import
code cleanupgood first issue

Repository metrics

Stars
 (2,761 個のスター)
PR merge metrics
 (30d に merged 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

コントリビューターガイド