diff --git a/dart/common/Stopwatch.hpp b/dart/common/Stopwatch.hpp index 6c48b5834343f..3a5ceec4cac67 100644 --- a/dart/common/Stopwatch.hpp +++ b/dart/common/Stopwatch.hpp @@ -119,19 +119,19 @@ class Stopwatch final DART_API void tic(); /// Returns the elapsed time in seconds since the last tic() call. -DART_API [[nodiscard]] double toc(bool print = false); +[[nodiscard]] DART_API double toc(bool print = false); /// Returns the elapsed time in seconds since the last tic() call. -DART_API [[nodiscard]] double tocS(bool print = false); +[[nodiscard]] DART_API double tocS(bool print = false); /// Returns the elapsed time in milliseconds since the last tic() call. -DART_API [[nodiscard]] double tocMS(bool print = false); +[[nodiscard]] DART_API double tocMS(bool print = false); /// Returns the elapsed time in microseconds since the last tic() call. -DART_API [[nodiscard]] double tocUS(bool print = false); +[[nodiscard]] DART_API double tocUS(bool print = false); /// Returns the elapsed time in nanoseconds since the last tic() call. -DART_API [[nodiscard]] double tocNS(bool print = false); +[[nodiscard]] DART_API double tocNS(bool print = false); using StopwatchS = Stopwatch; using StopwatchMS = Stopwatch; diff --git a/dart/common/String.hpp b/dart/common/String.hpp index 7ab07f5765b97..9b5ccaf756560 100644 --- a/dart/common/String.hpp +++ b/dart/common/String.hpp @@ -41,31 +41,31 @@ namespace dart::common { /// Converts string to upper cases -DART_API [[nodiscard]] std::string toUpper(std::string str); +[[nodiscard]] DART_API std::string toUpper(std::string str); /// Converts string to upper cases in place DART_API void toUpperInPlace(std::string& str); /// Converts string to lower cases -DART_API [[nodiscard]] std::string toLower(std::string str); +[[nodiscard]] DART_API std::string toLower(std::string str); /// Converts string to lower cases in place DART_API void toLowerInPlace(std::string& str); /// Trims both sides of string -DART_API [[nodiscard]] std::string trim( +[[nodiscard]] DART_API std::string trim( const std::string& str, const std::string& whitespaces = " \n\r\t"); /// Trims left side of string -DART_API [[nodiscard]] std::string trimLeft( +[[nodiscard]] DART_API std::string trimLeft( const std::string& str, const std::string& whitespaces = " \n\r\t"); /// Trims right side of string -DART_API [[nodiscard]] std::string trimRight( +[[nodiscard]] DART_API std::string trimRight( const std::string& str, const std::string& whitespaces = " \n\r\t"); /// Splits string given delimiters -DART_API [[nodiscard]] std::vector split( +[[nodiscard]] DART_API std::vector split( const std::string& str, const std::string& delimiters = " \n\r\t"); } // namespace dart::common