To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit f82bbd15 authored by amiessen's avatar amiessen
Browse files

added data read instruction for long vs. int

parent b612da8b
......@@ -11,7 +11,11 @@ void readData(const std::string & data_path, std::vector<T> & data) {
std::string val;
if (inFile.is_open()) {
while (getline(inFile, val, ',')) {
data.push_back(std::stoi(val));
if (std::is_same<T, int>::value) {
data.push_back(std::stoi(val));
} else if (std::is_same<T, long>::value) {
data.push_back(std::stol(val));
}
}
inFile.close();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment