File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,16 +46,17 @@ std::vector<std::string> CODECFactory::allNames() const {
4646}
4747
4848std::shared_ptr<IntegerCODEC> const & CODECFactory::getFromName (std::string name) const {
49- if (scodecmap. find (name) == scodecmap.end ()) {
50- fprintf (stderr, " name %s does not refer to a CODEC. \n "
51- " possible choices: \n " , name. c_str ()) ;
52- for ( auto i = scodecmap. begin (); i != scodecmap. end (); ++i) {
53- fprintf (stderr, " %s \n " , i-> first . c_str ());
54- }
55- fprintf (stderr, " for now, I'm going to just return 'copy' \n " );
56- return scodecmap. at ( " copy " );
49+ auto it = scodecmap.find (name);
50+ if (it != scodecmap. end ())
51+ return it-> second ;
52+
53+ fprintf (stderr, " name %s does not refer to a CODEC. \n "
54+ " possible choices: \n " , name. c_str ());
55+ for ( auto i = scodecmap. begin (); i != scodecmap. end (); ++i) {
56+ fprintf (stderr, " %s \n " , i-> first . c_str () );
5757 }
58- return scodecmap.at (name);
58+ fprintf (stderr, " for now, I'm going to just return 'copy'\n " );
59+ return scodecmap.at (" copy" );
5960}
6061
6162std::unique_ptr<IntegerCODEC> fastbinarypacking8_codec () {
You can’t perform that action at this time.
0 commit comments