@@ -49,8 +49,8 @@ int main(int argc, char* argv[])
4949 bpo::options_description desc (" Usage:\n "
5050 " pack: lstpacker <directory>\n "
5151 " unpack: lstpacker <file.lst> <file.lst> ...\n " );
52- desc.add_options ()(" help,h" , " Show help" )(" file,f" , bpo::value<std::vector<bfs::path> >()->multitoken (),
53- " File to unpack or directory to pack" )(" palette,p" , bpo::value<bfs::path >(),
52+ desc.add_options ()(" help,h" , " Show help" )(" file,f" , bpo::value<std::vector<std::string> >()->multitoken (),
53+ " File to unpack or directory to pack" )(" palette,p" , bpo::value<std::string >(),
5454 " Palette (bbm/act) to use instead of default one" )(
5555 " palAsTxt,t" , " Output palettes as human readable txt files" )(
5656 " texFmt" , bpo::value<std::string>(&texFmt)->default_value (" original" ),
@@ -81,8 +81,8 @@ int main(int argc, char* argv[])
8181
8282 if (options.count (" palette" ))
8383 {
84- bfs::path palPath = options[" palette" ].as <bfs::path >();
85- if (libsiedler2::Load (palPath. string () , bbm) != 0 )
84+ const auto palPath = options[" palette" ].as <std::string >();
85+ if (libsiedler2::Load (palPath, bbm) != 0 )
8686 {
8787 bnw::cerr << " Error: Could not load given palette: " << palPath << std::endl;
8888 bnw::cerr << " Retrying with default ones" << std::endl;
@@ -103,10 +103,10 @@ int main(int argc, char* argv[])
103103 }
104104 }
105105
106- libsiedler2::ArchivItem_Palette* palette = ( libsiedler2::ArchivItem_Palette*) bbm[0 ];
106+ libsiedler2::ArchivItem_Palette* palette = dynamic_cast < libsiedler2::ArchivItem_Palette*>( bbm[0 ]) ;
107107
108- std::vector<bfs::path> inputPaths ( options[" file" ].as <std::vector<bfs::path> >() );
109- for (const bfs::path& inputPath : inputPaths)
108+ const auto inputPaths = options[" file" ].as <std::vector<std::string>>( );
109+ for (const bfs::path inputPath : inputPaths)
110110 {
111111 if (!bfs::exists (inputPath))
112112 {
0 commit comments