Skip to content

Commit fcd1a57

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26827: doc: use "std lib clock" over "C++11 clock"
672f7ad doc: remove usages of C++11 (fanquake) Pull request description: These were new in C++11, and now they are just our standard library. ACKs for top commit: jarolrod: re-ACK 672f7ad hebasto: re-ACK 672f7ad Tree-SHA512: 7e3b8b0346ba29b19e6d8536700ca510e2b543cdeecd9e740bba71ea6d0133dd96cdaeaa00f371f8ef85913ff5aaabe12878255f393dac7d354a8b89b58d050a
2 parents edc3d1b + 672f7ad commit fcd1a57

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.github/ISSUE_TEMPLATE/good_first_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ assignees: ''
1515

1616
#### Useful skills:
1717

18-
<!-- (For example, “C++11 std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->
18+
<!-- (For example, “std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->
1919

2020
#### Want to work on this issue?
2121

src/random.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static inline int64_t GetPerformanceCounter() noexcept
6262
__asm__ volatile ("rdtsc" : "=a"(r1), "=d"(r2)); // Constrain r1 to rax and r2 to rdx.
6363
return (r2 << 32) | r1;
6464
#else
65-
// Fall back to using C++11 clock (usually microsecond or nanosecond precision)
65+
// Fall back to using standard library clock (usually microsecond or nanosecond precision)
6666
return std::chrono::high_resolution_clock::now().time_since_epoch().count();
6767
#endif
6868
}
@@ -438,7 +438,7 @@ class RNGState {
438438

439439
RNGState& GetRNGState() noexcept
440440
{
441-
// This C++11 idiom relies on the guarantee that static variable are initialized
441+
// This idiom relies on the guarantee that static variable are initialized
442442
// on first call, even when multiple parallel calls are permitted.
443443
static std::vector<RNGState, secure_allocator<RNGState>> g_rng(1);
444444
return g_rng[0];

src/random.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class FastRandomContext
250250
/* interval [0..0] */ Dur{0};
251251
};
252252

253-
// Compatibility with the C++11 UniformRandomBitGenerator concept
253+
// Compatibility with the UniformRandomBitGenerator concept
254254
typedef uint64_t result_type;
255255
static constexpr uint64_t min() { return 0; }
256256
static constexpr uint64_t max() { return std::numeric_limits<uint64_t>::max(); }

src/randomenv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ void RandAddDynamicEnv(CSHA512& hasher)
250250
gettimeofday(&tv, nullptr);
251251
hasher << tv;
252252
#endif
253-
// Probably redundant, but also use all the clocks C++11 provides:
253+
// Probably redundant, but also use all the standard library clocks:
254254
hasher << std::chrono::system_clock::now().time_since_epoch().count();
255255
hasher << std::chrono::steady_clock::now().time_since_epoch().count();
256256
hasher << std::chrono::high_resolution_clock::now().time_since_epoch().count();

src/reverse_iterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define BITCOIN_REVERSE_ITERATOR_H
55

66
/**
7-
* Template used for reverse iteration in C++11 range-based for loops.
7+
* Template used for reverse iteration in range-based for loops.
88
*
99
* std::vector<int> v = {1, 2, 3, 4, 5};
1010
* for (auto x : reverse_iterate(v))

src/test/random_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(fastrandom_randbits)
101101
}
102102
}
103103

104-
/** Does-it-compile test for compatibility with standard C++11 RNG interface. */
104+
/** Does-it-compile test for compatibility with standard library RNG interface. */
105105
BOOST_AUTO_TEST_CASE(stdrandom_test)
106106
{
107107
FastRandomContext ctx;

0 commit comments

Comments
 (0)