Skip to content

Commit

Permalink
Use base/random.h instead of openssl::RandomValue.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Sep 15, 2021
1 parent d7bdfa2 commit b35d2d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ui/paint/blob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ui/widgets/input_fields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit b35d2d2

Please sign in to comment.