Skip to content

Commit

Permalink
Use std::string instead of const char* as constructor parameter for S…
Browse files Browse the repository at this point in the history
…copeTime
  • Loading branch information
Heiko Thiel committed Mar 15, 2019
1 parent 59bdd1b commit cc1b6c1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions common/include/pcl/common/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace pcl
inline double
getTimeSeconds () const
{
return (getTime () * 0.001f);
return (getTime () * 0.001);
}

/** \brief Reset the stopwatch to 0. */
Expand Down Expand Up @@ -110,13 +110,11 @@ namespace pcl
class ScopeTime : public StopWatch
{
public:
inline ScopeTime (const char* title) :
title_ (std::string (title))
inline ScopeTime (const std::string &title = "") :
title_ (title)
{
}

inline ScopeTime () : ScopeTime ("") {};

inline ~ScopeTime ()
{
double val = this->getTime ();
Expand Down

0 comments on commit cc1b6c1

Please sign in to comment.