28 lines
632 B
C++
28 lines
632 B
C++
#include "beatmapcharacteristic.h"
|
|
#include "difficulties.h"
|
|
|
|
namespace Beatsaber {
|
|
namespace BeatmapCharacteristic {
|
|
|
|
BeatmapCharacteristic getByString(const std::string& str) {
|
|
for(uint8_t i = 0; i < characteristicsNameSize; ++i) {
|
|
if(str == characteristicsName[i]) { //TODO equals ignore Case
|
|
return (BeatmapCharacteristic) i;
|
|
}
|
|
}
|
|
return BeatmapCharacteristic::NONE;
|
|
}
|
|
|
|
}
|
|
|
|
namespace Difficulty {
|
|
Difficulty getByString(const std::string& str) {
|
|
for(uint8_t i = 0; i < difficultyNameSize; ++i) {
|
|
if(str == difficultyName[i]) { //TODO equals ignore Case
|
|
return (Difficulty) i;
|
|
}
|
|
}
|
|
return Difficulty::NONE;
|
|
}
|
|
}
|
|
} |