stan-dev/stan

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

Open

#2 577 ouverte le 10 juil. 2018

Voir sur GitHub
 (13 commentaires) (0 réactions) (1 assigné)R (270 forks)batch import
code cleanupgood first issue

Métriques du dépôt

Stars
 (1 476 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur