Skip to content

Commit b4310aa

Browse files
committed
Use std::clog instead of std::cerr to log progress
Fixes #935
1 parent 9f31f88 commit b4310aa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Change Log -- Ray Tracing in One Weekend
2020
- Fix: CSS fix for cases where code listing overflow; change to fit content (#826)
2121
- Change: `hittable` member variable `ptr` renamed to `object`
2222
- Change: general rename of `mat_ptr` to `mat` (material)
23-
- Change: hittable::bounding_box() signature has changed to always return a value (#859)
23+
- Change: `hittable::bounding_box()` signature has changed to always return a value (#859)
2424
- Fix: Enabled compiler warnings for MSVC, Clang, GNU. Cleaned up warnings as fit (#865)
2525
- Change: replaced random vector in `isotropic` with `random_unit_vector`
2626
- Delete: `box`, `xy_rect`, `yz_rect`, `xz_rect` classes. Now replaced with new `quad` primitive
@@ -29,6 +29,7 @@ Change Log -- Ray Tracing in One Weekend
2929
- Added: New 2D `quad` primitive of arbitrary orientation (#756)
3030
- Added: New `box()` utility function returns `hittable_list` of new `quad` primitives (#780)
3131
- Fix: Add `\mathit` to italic math variables to fix slight kerning issues in equations (#839)
32+
- Change: Use std::clog instead of std::cerr to log scanline progress (#935)
3233

3334
### In One Weekend
3435
- Added: More commentary about the choice between `double` and `float` (#752)

src/InOneWeekend/scene.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class scene {
2727
std::cout << "P3\n" << image_width << ' ' << image_height << "\n255\n";
2828

2929
for (int j = image_height-1; j >= 0; --j) {
30-
std::cerr << "\rScanlines remaining: " << j << ' ' << std::flush;
30+
std::clog << "\rScanlines remaining: " << j << ' ' << std::flush;
3131
for (int i = 0; i < image_width; ++i) {
3232
color pixel_color(0,0,0);
3333
for (int s = 0; s < samples_per_pixel; ++s) {
@@ -40,7 +40,7 @@ class scene {
4040
}
4141
}
4242

43-
std::cerr << "\nDone.\n";
43+
std::clog << "\nDone.\n";
4444
}
4545

4646
public:

0 commit comments

Comments
 (0)