mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 23:15:52 +00:00
deploy: 023f5704d0
This commit is contained in:
@@ -93,26 +93,28 @@ $(function() {
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
|
||||
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keyword">template</span><<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a"> 26</a></span>  constexpr <span class="keyword">auto</span> <a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(T value) noexcept</div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  {</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">return</span> value * 1024;</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  }</div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keyword">template</span><<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db"> 32</a></span>  constexpr <span class="keyword">auto</span> <a class="code" href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db">megabytes</a>(T value) noexcept</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  {</div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(<a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(value));</div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  }</div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  </div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  static_assert(<a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(2) == 2048, <span class="stringliteral">"kilobytes(2) == 2048"</span>);</div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  static_assert(<a class="code" href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db">megabytes</a>(3) == 3145728, <span class="stringliteral">"megabytes(3) == 3145728"</span>);</div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> constexpr <span class="keyword">auto</span></div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a"> 27</a></span> <a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(T value) noexcept</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> {</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">return</span> value * 1024;</div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> }</div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  </div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> constexpr <span class="keyword">auto</span></div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db"> 34</a></span> <a class="code" href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db">megabytes</a>(T value) noexcept</div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> {</div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(<a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(value));</div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> }</div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> static_assert(<a class="code" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(2) == 2048, <span class="stringliteral">"kilobytes(2) == 2048"</span>);</div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> static_assert(<a class="code" href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db">megabytes</a>(3) == 3145728, <span class="stringliteral">"megabytes(3) == 3145728"</span>);</div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> } <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="anamespaceripple_html_a8f7c1dac6a768426c7fc2bf4b544254a"><div class="ttname"><a href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">ripple::kilobytes</a></div><div class="ttdeci">constexpr auto kilobytes(T value) noexcept</div><div class="ttdef"><b>Definition:</b> <a href="ByteUtilities_8h_source.html#l00026">ByteUtilities.h:26</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a13d7c6c34d30731bbc221f629e03f8db"><div class="ttname"><a href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db">ripple::megabytes</a></div><div class="ttdeci">constexpr auto megabytes(T value) noexcept</div><div class="ttdef"><b>Definition:</b> <a href="ByteUtilities_8h_source.html#l00032">ByteUtilities.h:32</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a8f7c1dac6a768426c7fc2bf4b544254a"><div class="ttname"><a href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">ripple::kilobytes</a></div><div class="ttdeci">constexpr auto kilobytes(T value) noexcept</div><div class="ttdef"><b>Definition:</b> <a href="ByteUtilities_8h_source.html#l00027">ByteUtilities.h:27</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a13d7c6c34d30731bbc221f629e03f8db"><div class="ttname"><a href="namespaceripple.html#a13d7c6c34d30731bbc221f629e03f8db">ripple::megabytes</a></div><div class="ttdeci">constexpr auto megabytes(T value) noexcept</div><div class="ttdef"><b>Definition:</b> <a href="ByteUtilities_8h_source.html#l00034">ByteUtilities.h:34</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
||||
Reference in New Issue
Block a user