diff --git a/mediachanger/acs/Acs.cpp b/mediachanger/acs/Acs.cpp index 714d98ec63b99b54a0ad676ff138e897f65068c6..e622b199c91b56590fb8f3e4f163bdbbba5a67cc 100644 --- a/mediachanger/acs/Acs.cpp +++ b/mediachanger/acs/Acs.cpp @@ -17,12 +17,12 @@ */ #include "Acs.hpp" -#include "common/utils/utils.hpp" #include <iomanip> #include <sstream> #include <stdint.h> #include <string.h> +#include <vector> //------------------------------------------------------------------------------ // destructor @@ -35,7 +35,20 @@ cta::mediachanger::acs::Acs::~Acs() { //------------------------------------------------------------------------------ DRIVEID cta::mediachanger::acs::Acs::str2DriveId(const std::string &str) { std::vector<std::string> components; - cta::utils::splitString(str, ':', components); + + if(!str.empty()) { + const char separator = ':'; + std::string::size_type beginIndex = 0; + std::string::size_type endIndex = str.find(separator); + + while(endIndex != std::string::npos) { + components.push_back(str.substr(beginIndex, endIndex - beginIndex)); + beginIndex = ++endIndex; + endIndex = str.find(separator, endIndex); + } + + components.push_back(str.substr(beginIndex)); + } // The drive ID should consist of 4 components: ACS, LSM, Panel and Transport if(4 != components.size()) {