stan-dev/stan

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

Aberta

#2.577 aberto em 10 de jul. de 2018

 (13 comentários) (0 reação) (1 responsável)C++ (387 forks)batch import
code cleanupgood first issue

Métricas do repositório

Stars
 (2.761 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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

Guia do colaborador