[DEV] WORK on a port for BOOST

This commit is contained in:
Edouard DUPIN 2015-02-24 22:20:11 +01:00
parent 96e5e72248
commit 63b327cb67
3 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ std::ostream& audio::operator <<(std::ostream& _os, const std::vector<enum audio
return _os; return _os;
} }
std::ostream& audio::operator <<(std::ostream& _os, const std::vector<std::vector<enum audio::channel>>& _obj) { std::ostream& audio::operator <<(std::ostream& _os, const std::vector<std::vector<enum audio::channel> >& _obj) {
_os << std::string("{"); _os << std::string("{");
for (size_t iii=0; iii<_obj.size(); ++iii) { for (size_t iii=0; iii<_obj.size(); ++iii) {
if (iii!=0) { if (iii!=0) {
@ -82,8 +82,8 @@ enum audio::channel audio::getChannelFromString(const std::string& _value) {
std::vector<enum audio::channel> audio::getListChannelFromString(const std::string& _value) { std::vector<enum audio::channel> audio::getListChannelFromString(const std::string& _value) {
std::vector<enum audio::channel> out; std::vector<enum audio::channel> out;
std::vector<std::string> list = etk::split(_value, ';'); std::vector<std::string> list = etk::split(_value, ';');
for (auto &it : list) { for (size_t iii=0; iii<list.size(); ++iii) {
out.push_back(getChannelFromString(it)); out.push_back(getChannelFromString(list[iii]));
} }
return out; return out;
} }

View File

@ -30,7 +30,7 @@ namespace audio {
std::vector<enum audio::channel> getListChannelFromString(const std::string& _value); std::vector<enum audio::channel> getListChannelFromString(const std::string& _value);
std::ostream& operator <<(std::ostream& _os, enum audio::channel _obj); std::ostream& operator <<(std::ostream& _os, enum audio::channel _obj);
std::ostream& operator <<(std::ostream& _os, const std::vector<enum audio::channel>& _obj); std::ostream& operator <<(std::ostream& _os, const std::vector<enum audio::channel>& _obj);
std::ostream& operator <<(std::ostream& _os, const std::vector<std::vector<enum audio::channel>>& _obj); std::ostream& operator <<(std::ostream& _os, const std::vector<std::vector<enum audio::channel> >& _obj);
}; };

View File

@ -56,8 +56,8 @@ enum audio::format audio::getFormatFromString(const std::string& _value) {
std::vector<enum audio::format> audio::getListFormatFromString(const std::string& _value) { std::vector<enum audio::format> audio::getListFormatFromString(const std::string& _value) {
std::vector<enum audio::format> out; std::vector<enum audio::format> out;
std::vector<std::string> list = etk::split(_value, ';'); std::vector<std::string> list = etk::split(_value, ';');
for (auto &it : list) { for (size_t iii=0; iii<list.size(); ++iii) {
out.push_back(getFormatFromString(it)); out.push_back(getFormatFromString(list[iii]));
} }
return out; return out;
} }