diff options
| author | jhurst <jhurst@cinecert.com> | 2015-10-07 16:41:23 +0000 |
|---|---|---|
| committer | jhurst <> | 2015-10-07 16:41:23 +0000 |
| commit | af6a1e4ef13dcf5811ccd9eb6b63d21bdc88dc70 (patch) | |
| tree | 021ae744f611d9bfd2f8832c665351132205ab0b /src/KM_util.cpp | |
| parent | 77200515d9acee07988f26dadfa37ffbd169cdfb (diff) | |
o Moved personal dev environment from older gcc to newer clang. Many small changes were made to satisfy the new compiler:
- Altered many printf format codes to use the correct type for the given integer type
- Parenthesized some expressions to clarify previously ambiguous expectations of precedence
- Created macro KM_MACOSX for use in OS-specific code selection
- Removed last uses of the old C-language abs(), now using Kumu::xabs()
- Removed last uses of the old C-language atoi()
o Added platform-independent call Kumu::GetExecutablePath() (test with win32)
o Fixed a bug that was causing Array properties to be written without the (count, length) header (from PAL)
o Fixed Win32 build (from Crowe)
o Added imlementation of SMPTE ST 2092-1 pink noise generator
o Added pinkwave CLI utility
o Added font support to the IMF timed-text wrapper
Diffstat (limited to 'src/KM_util.cpp')
| -rwxr-xr-x | src/KM_util.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/KM_util.cpp b/src/KM_util.cpp index 29c3802..2ccf9e9 100755 --- a/src/KM_util.cpp +++ b/src/KM_util.cpp @@ -796,8 +796,8 @@ Kumu::Timestamp::EncodeString(char* str_buf, ui32_t buf_len) const tmp_t.AddMinutes(m_TZOffsetMinutes); tmp_t.GetComponents(year, month, day, hour, minute, second); - ofst_hours = abs(m_TZOffsetMinutes) / 60; - ofst_minutes = abs(m_TZOffsetMinutes) % 60; + ofst_hours = Kumu::xabs(m_TZOffsetMinutes) / 60; + ofst_minutes = Kumu::xabs(m_TZOffsetMinutes) % 60; if ( m_TZOffsetMinutes < 0 ) direction = '-'; @@ -805,7 +805,7 @@ Kumu::Timestamp::EncodeString(char* str_buf, ui32_t buf_len) const // 2004-05-01T13:20:00+00:00 snprintf(str_buf, buf_len, - "%04hu-%02hu-%02huT%02hu:%02hu:%02hu%c%02hu:%02hu", + "%04hu-%02hhu-%02hhuT%02hhu:%02hhu:%02hhu%c%02u:%02u", year, month, day, hour, minute, second, direction, ofst_hours, ofst_minutes); @@ -1185,11 +1185,7 @@ Kumu::km_token_split(const std::string& str, const std::string& separator) r = strstr(pstr, separator.c_str()); } - if ( strlen(pstr) >= 0 ) - { - components.push_back(std::string(pstr)); - } - + components.push_back(std::string(pstr)); return components; } |
