Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed some comments and moved/renamed some variables. No functional change.
- Loading branch information
Showing
3 changed files
with
37 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2416242
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm only a C++ learner, so please bear with me. In line 66 of timeman.cpp you removed the int after return even though MyTime has been defined as int type and ratio 1&2 as double. I expected you to change it to static_cast . I know it still works since we know better.
Am I way off base here?
2416242
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things:
int(x)
, orstatic_cast<int>(x)
is the same thing. The latter is particularly ugly, so we prefer the former... except in the syzygy code, where, for some unknown reason, Gary decided to usestatic_cast<T>
. But the syzygy code is ugly anyway, so...int
cast is implicit here, because the return value of the function isint
(the compiler knows that). So you can add anint
cast to be pedantic, but it's not necessary.2416242
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, fair enough. Thanks for the explanation. I'm probably too pedantic at the best of times. I presume they all compile the same at any rate.