small fixes

This commit is contained in:
Akash Mozumdar 2021-07-01 23:50:47 -06:00
parent 493e80e568
commit 5862bf50ac
2 changed files with 3 additions and 4 deletions

View File

@ -130,9 +130,8 @@ std::pair<bool, std::wstring> Translate(const std::wstring& text, TranslationPar
}
// the following code was reverse engineered from the DeepL website; it's as close as I could make it but I'm not sure what parts of this could be removed and still have it work
int id = 10000 * std::uniform_int_distribution(0, 9999)(std::random_device()) + 1;
int64_t r = _time64(nullptr), n = std::count(text.begin(), text.end(), L'i') + 1;
thread_local auto generator = std::mt19937(std::random_device()());
int id = 10000 * std::uniform_int_distribution(0, 9999)(generator) + 1;
// user_preferred_langs? what should priority be? does timestamp do anything? other translation quality options?
auto body = FormatString(R"(
{

View File

@ -1,10 +1,10 @@
#include "devtools.h"
#include <ppltasks.h>
#include <ShlObj.h>
#include <QWebSocket>
#include <QMetaEnum>
#include <QFileDialog>
#include <QMouseEvent>
#include <ppltasks.h>
#include <ShlObj.h>
extern const char* CHROME_LOCATION;
extern const char* START_DEVTOOLS;