Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: src/IceRNG.h

Issue 952953002: Subzero: Improve class definition hygiene. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix typo Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceOperand.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceRNG.h
diff --git a/src/IceRNG.h b/src/IceRNG.h
index bb2ac45751c174506a613809281547594a81fc24..174e3e0a9558e1cad339de70949f2c3e51b2eb61 100644
--- a/src/IceRNG.h
+++ b/src/IceRNG.h
@@ -22,11 +22,12 @@
namespace Ice {
class RandomNumberGenerator {
+ RandomNumberGenerator() = delete;
RandomNumberGenerator(const RandomNumberGenerator &) = delete;
RandomNumberGenerator &operator=(const RandomNumberGenerator &) = delete;
public:
- RandomNumberGenerator(llvm::StringRef Salt);
+ explicit RandomNumberGenerator(llvm::StringRef Salt);
uint64_t next(uint64_t Max);
private:
@@ -37,6 +38,7 @@ private:
// reason for the wrapper class is that we want to keep the
// RandomNumberGenerator interface identical to LLVM's.
class RandomNumberGeneratorWrapper {
+ RandomNumberGeneratorWrapper() = delete;
RandomNumberGeneratorWrapper(const RandomNumberGeneratorWrapper &) = delete;
RandomNumberGeneratorWrapper &
operator=(const RandomNumberGeneratorWrapper &) = delete;
@@ -44,7 +46,8 @@ class RandomNumberGeneratorWrapper {
public:
uint64_t operator()(uint64_t Max) { return RNG.next(Max); }
bool getTrueWithProbability(float Probability);
- RandomNumberGeneratorWrapper(RandomNumberGenerator &RNG) : RNG(RNG) {}
+ explicit RandomNumberGeneratorWrapper(RandomNumberGenerator &RNG)
+ : RNG(RNG) {}
private:
RandomNumberGenerator &RNG;
« no previous file with comments | « src/IceOperand.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698