stan-dev/stan

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

Open

#2577 aperta il 10 lug 2018

Vedi su GitHub
 (13 commenti) (0 reazioni) (1 assegnatario)R (270 fork)batch import
code cleanupgood first issue

Metriche repository

Star
 (1476 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor