Use base/random.h instead of openssl::RandomValue.

This commit is contained in:
John Preston 2021-09-15 13:16:44 +03:00
parent d7bdfa2b5e
commit b35d2d257a
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
//
#include "ui/paint/blob.h"
#include "base/openssl_help.h"
#include "base/random.h"
#include "ui/painter.h"
#include <QtGui/QPainterPath>
@ -22,8 +22,8 @@ constexpr auto kMinSpeed = 0.8;
constexpr auto kMinSegmentSpeed = 0.017;
constexpr auto kSegmentSpeedDiff = 0.003;
float64 RandomAdditional() {
return (openssl::RandomValue<int>() % 100 / 100.);
[[nodiscard]] float64 RandomAdditional() {
return (base::RandomValue<int>() % 100 / 100.);
}
} // namespace

View file

@ -11,7 +11,7 @@
#include "ui/emoji_config.h"
#include "ui/ui_utility.h"
#include "base/invoke_queued.h"
#include "base/openssl_help.h"
#include "base/random.h"
#include "base/platform/base_platform_info.h"
#include "emoji_suggestions_helper.h"
#include "styles/palette.h"
@ -3130,7 +3130,7 @@ void InputField::commitInstantReplacement(
format.setProperty(kInstantReplaceWithId, replacement);
format.setProperty(
kInstantReplaceRandomId,
openssl::RandomValue<uint32>());
base::RandomValue<uint32>());
ApplyTagFormat(format, cursor.charFormat());
cursor.insertText(replacement, format);
}