New issue
Advanced search Search tips

Issue 672232 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Make In/From method naming consistent in base::Time* classes

Project Member Reported by majidvp@chromium.org, Dec 7 2016

Issue description

They use inconsistent suffixes for floating point input and outputs. We have:

TimeDelta::FromSecondsD
TimeDelta::FromMillisecondsD

TimeDelta::InSecondsF
TimeDelta::InMillisecondsF

I suggest using 'F' suffix to indicate 'floating point' for all these methods.

 
On second thought, do we even need to have the suffix for From* methods?
I thought the compiler will choose the right method based on the input type and avoiding any float-integral conversion.

Comment 2 by m...@chromium.org, Dec 8 2016

re. comment 1: I think we need the suffix on the From* methods, per Google C++ style guide rules: https://google.github.io/styleguide/cppguide.html#Function_Overloading

Status: Assigned (was: Untriaged)

Sign in to add a comment