mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-02 10:14:48 +12:00
Fix SIMD on MSVC (#639)
This commit is contained in:
parent
20a6e0bf0d
commit
224ddac07c
3 changed files with 22 additions and 15 deletions
src/core/crypto
|
@ -2,7 +2,10 @@
|
|||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "helpers.hpp"
|
||||
|
||||
|
@ -15,6 +18,19 @@ namespace Crypto {
|
|||
return;
|
||||
}
|
||||
|
||||
auto splitString = [](const std::string& s, const char c) -> std::vector<std::string> {
|
||||
std::istringstream tmp(s);
|
||||
std::vector<std::string> result(1);
|
||||
|
||||
while (std::getline(tmp, *result.rbegin(), c)) {
|
||||
result.emplace_back();
|
||||
}
|
||||
|
||||
// Remove temporary slot
|
||||
result.pop_back();
|
||||
return result;
|
||||
};
|
||||
|
||||
while (!file.eof()) {
|
||||
std::string line;
|
||||
std::getline(file, line);
|
||||
|
@ -24,7 +40,7 @@ namespace Crypto {
|
|||
continue;
|
||||
}
|
||||
|
||||
const auto parts = Helpers::split(line, '=');
|
||||
const auto parts = splitString(line, '=');
|
||||
if (parts.size() != 2) {
|
||||
Helpers::warn("Keys: Failed to parse %s", line.c_str());
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue