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/kmfilegen.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/kmfilegen.cpp')
| -rwxr-xr-x | src/kmfilegen.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/kmfilegen.cpp b/src/kmfilegen.cpp index 6f798cc..9ba816e 100755 --- a/src/kmfilegen.cpp +++ b/src/kmfilegen.cpp @@ -123,15 +123,16 @@ public: bool verbose_flag; // true if the verbose option was selected bool version_flag; // true if the version display option was selected bool help_flag; // true if the help display option was selected - const char* filename; // filename to be processed - const char* write_filename; // filename to write with val_write_flag + std::string filename; // filename to be processed + std::string write_filename; // filename to write with val_write_flag ui32_t chunk_count; MajorMode_t mode; // MajorMode selector // CommandOptions(int argc, const char** argv) : - error_flag(true), order(""), verbose_flag(false), version_flag(false), help_flag(false), - filename(""), write_filename(""), chunk_count(0), mode(MMT_VALIDATE) + error_flag(true), order(""), verbose_flag(false), + version_flag(false), help_flag(false), + chunk_count(0), mode(MMT_VALIDATE) { // order = "rand"; @@ -187,7 +188,7 @@ public: { if (argv[i][0] != '-' ) { - if ( filename != "" ) + if ( ! filename.empty() ) { fprintf(stderr, "Extra filename found: %s\n", argv[i]); return; @@ -206,7 +207,7 @@ public: if ( help_flag || version_flag ) return; - if ( strlen ( filename ) == 0 ) + if ( filename.empty() ) { fprintf(stderr, "Filename required.\n"); return; @@ -221,7 +222,7 @@ public: if ( strcmp(order, "") == 0 ) order = "rand"; - if ( strcmp ( filename, write_filename ) == 0 ) + if ( filename == write_filename ) { fprintf(stderr, "Output and input files must be different.\n"); return; @@ -382,7 +383,7 @@ randomize_list(read_list_t* read_list, ui32_t check_total) Result_t ReadValidateWriteLargeFile(CommandOptions& Options) { - assert(Options.write_filename); + assert(!Options.write_filename.empty()); ui32_t check_total = 0; ui32_t write_total = 0; ui32_t read_count = 0; |
