Skip to content

Commit 6c620c5

Browse files
committed
deploy: 5278b6e
1 parent ad403df commit 6c620c5

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

design_virtual/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ <h2 id="_3">多重策略</h2>
559559

560560
int reduce(Inputer *inputer, Reducer *reducer) {
561561
int res = reducer-&gt;init();
562-
while (int tmp = inputer-&gt;fetch()) {
563-
res = reducer-&gt;add(res, tmp);
562+
while (auto tmp = inputer-&gt;fetch()) {
563+
res = reducer-&gt;add(res, tmp.value());
564564
}
565565
return res;
566566
}
@@ -604,8 +604,8 @@ <h2 id="_4">不要什么东西都塞一块</h2>
604604
<p>有些糟糕的实现会把分明不属于同一层次的东西强行放在一起,比如没能分清 Inputer 和 Reducer 类,错误地把他们设计成了一个类!</p>
605605
<pre><code class="language-cpp">int reduce(Reducer *reducer) {
606606
int res = reducer-&gt;init();
607-
while (int tmp = reducer-&gt;fetch()) { // fetch 凭什么和 init、add 放在一起?
608-
res = reducer-&gt;add(res, tmp);
607+
while (auto tmp = reducer-&gt;fetch()) { // fetch 凭什么和 init、add 放在一起?
608+
res = reducer-&gt;add(res, tmp.value());
609609
}
610610
return res;
611611
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h2 id="_1">前言</h2>
292292
<blockquote>
293293
<p><img src="./img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
294294
</blockquote>
295-
<p>更新时间:2024年10月18日 15:46:00 (UTC+08:00)</p>
295+
<p>更新时间:2024年10月18日 15:46:43 (UTC+08:00)</p>
296296
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
297297
<h2 id="_2">格式约定</h2>
298298
<blockquote>

print_page/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ <h2 id="index-_1">前言</h2>
421421
<blockquote>
422422
<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
423423
</blockquote>
424-
<p>更新时间:2024年10月18日 15:46:00 (UTC+08:00)</p>
424+
<p>更新时间:2024年10月18日 15:46:43 (UTC+08:00)</p>
425425
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
426426
<h2 id="index-_2">格式约定</h2>
427427
<blockquote>
@@ -12250,8 +12250,8 @@ <h2 id="design_virtual-_3">多重策略</h2>
1225012250

1225112251
int reduce(Inputer *inputer, Reducer *reducer) {
1225212252
int res = reducer-&gt;init();
12253-
while (int tmp = inputer-&gt;fetch()) {
12254-
res = reducer-&gt;add(res, tmp);
12253+
while (auto tmp = inputer-&gt;fetch()) {
12254+
res = reducer-&gt;add(res, tmp.value());
1225512255
}
1225612256
return res;
1225712257
}
@@ -12295,8 +12295,8 @@ <h2 id="design_virtual-_4">不要什么东西都塞一块</h2>
1229512295
<p>有些糟糕的实现会把分明不属于同一层次的东西强行放在一起,比如没能分清 Inputer 和 Reducer 类,错误地把他们设计成了一个类!</p>
1229612296
<pre><code class="language-cpp">int reduce(Reducer *reducer) {
1229712297
int res = reducer-&gt;init();
12298-
while (int tmp = reducer-&gt;fetch()) { // fetch 凭什么和 init、add 放在一起?
12299-
res = reducer-&gt;add(res, tmp);
12298+
while (auto tmp = reducer-&gt;fetch()) { // fetch 凭什么和 init、add 放在一起?
12299+
res = reducer-&gt;add(res, tmp.value());
1230012300
}
1230112301
return res;
1230212302
}

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)