enums: implement operator{<<,>>} for VisualizerType and use it

This commit is contained in:
Andrzej Rybczak
2014-10-26 20:43:24 +01:00
parent 459aa706c0
commit 35fdddff87
6 changed files with 55 additions and 41 deletions

View File

@@ -43,20 +43,6 @@ NC::Color stringToColor(const std::string &color)
return result;
}
VisualizerType stringToVisualizerType(const std::string &visualizerType)
{
VisualizerType result = VisualizerType::Wave;
if (visualizerType == "wave")
result = VisualizerType::Wave;
else if (visualizerType == "spectrum")
result = VisualizerType::Spectrum;
else if (visualizerType == "wave_filled")
result = VisualizerType::WaveFilled;
else if (visualizerType == "ellipse")
result = VisualizerType::Ellipse;
return result;
}
NC::Border stringToBorder(const std::string &border)
{
NC::Border result = NC::Border::None;

View File

@@ -27,7 +27,6 @@
#include "enums.h"
NC::Color stringToColor(const std::string &color);
VisualizerType stringToVisualizerType(const std::string &visualizerType);
NC::Border stringToBorder(const std::string &border);
std::string tagTypeToString(mpd_tag_type tag);