refacor media widget, apply clang format rule

This commit is contained in:
2026-02-07 14:14:50 +01:00
parent 64b3babd3d
commit d9ac353a0d
54 changed files with 642 additions and 878 deletions

View File

@@ -3,9 +3,8 @@
#include <string>
#include <vector>
class StringHelper {
public:
public:
static std::vector<std::string> split(const std::string &input, char delimiter) {
std::vector<std::string> tokens;
std::string token;
@@ -25,14 +24,14 @@ public:
return tokens;
}
static std::vector<std::string> split(const std::string &input, std::string delimiter) {
static std::vector<std::string> split(const std::string &input, std::string delimiter) {
std::vector<std::string> tokens;
size_t start = 0;
size_t end = input.find(delimiter);
size_t end = input.find(delimiter);
while (end != std::string::npos) {
tokens.push_back(input.substr(start, end - start));
start = end + delimiter.length();
end = input.find(delimiter, start);
end = input.find(delimiter, start);
}
tokens.push_back(input.substr(start));
return tokens;