Changed ostringstream to ostream for new print_params and added the old

version of print_params for backwards compatibility.
This commit is contained in:
1Hyena
2014-05-12 23:01:44 +03:00
parent dfdb09386f
commit 6c118ebc51

View File

@@ -79,14 +79,19 @@ T get_param(const IndexParams& params, std::string name)
} }
} }
inline void print_params(const IndexParams& params, std::ostringstream& stream) inline void print_params(const IndexParams& params, std::ostream& stream)
{ {
IndexParams::const_iterator it; IndexParams::const_iterator it;
for(it=params.begin(); it!=params.end(); ++it) { for(it=params.begin(); it!=params.end(); ++it) {
stream << it->first << " : " << it->second << std::endl; stream << it->first << " : " << it->second << std::endl;
} }
} }
inline void print_params(const IndexParams& params)
{
print_params(params, std::cout);
}
} }