mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
kobo cheats death again (+1 squashed commits)
Squashed commits: [708e2429] kobo cheats death again
This commit is contained in:
parent
f9f1585a7f
commit
b4dc29f425
10 changed files with 225 additions and 46 deletions
|
@ -62,19 +62,6 @@ void replace_all_chars(std::string& str, char target, char replacement) {
|
|||
}
|
||||
}
|
||||
|
||||
std::string format(const char* fmt, ...) {
|
||||
va_list ap;
|
||||
va_list ap2;
|
||||
va_start(ap, fmt);
|
||||
va_copy(ap2, ap);
|
||||
int size = vsnprintf(NULL, 0, fmt, ap);
|
||||
std::vector<char> buf(size + 1);
|
||||
int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2);
|
||||
va_end(ap2);
|
||||
va_end(ap);
|
||||
return std::string(buf.data(), size);
|
||||
}
|
||||
|
||||
#ifdef _WIN32 // code for windows
|
||||
#include <windows.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue