Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Common/Convert.cpp (1 of 14 files). Show all
Unified · Split
| @@ -100,7 +100,7 @@ string PreparseTimestamp(const string& timestamp, time_duration& utcOffset) · 99 unmodified lines | |||
| 100 | timeParts = Split(timePart, ":", false); | 100 | timeParts = Split(timePart, ":", false); |
| 101 | 101 | ||
| 102 | if (timeParts.size() == 2) | 102 | if (timeParts.size() == 2) |
| 103 | timeParts.push_back("00"); | 103 | timeParts.emplace_back("00"); |
| 104 | 104 | ||
| 105 | if (timeParts.size() != 3) | 105 | if (timeParts.size() != 3) |
| 106 | return timestamp; | 106 | return timestamp; |
| @@ -227,12 +227,12 @@ uint32_t GSF::TicksToString(char* ptr, uint32_t maxsize, string format, int64_t · 120 unmodified lines | |||
| 227 | return strftime(ptr, maxsize, formatStream.str().data(), &timeinfo); | 227 | return strftime(ptr, maxsize, formatStream.str().data(), &timeinfo); |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | std::string GSF::ToString(Guid value) | 230 | std::string GSF::ToString(const Guid& value) |
| 231 | { | 231 | { |
| 232 | return boost::uuids::to_string(value); | 232 | return boost::uuids::to_string(value); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | std::string GSF::ToString(DateTime value, const char* format) | 235 | std::string GSF::ToString(const DateTime& value, const char* format) |
| 236 | { | 236 | { |
| 237 | using namespace boost::gregorian; | 237 | using namespace boost::gregorian; |
| 238 | 238 | ||
| @@ -301,7 +301,7 @@ const char* GSF::Coalesce(const char* data, const char* nonEmptyValue) · 62 unmodified lines | |||
| 301 | if (data == nullptr) | 301 | if (data == nullptr) |
| 302 | return nonEmptyValue; | 302 | return nonEmptyValue; |
| 303 | 303 | ||
| 304 | if (strlen(data) == 0) | 304 | if (data[0] == '\0') |
| 305 | return nonEmptyValue; | 305 | return nonEmptyValue; |
| 306 | 306 | ||
| 307 | return data; | 307 | return data; |