From 37e23eaee636ae13a19c955106b9604331db1cbc Mon Sep 17 00:00:00 2001 From: Sam Mercer Date: Tue, 27 Feb 2024 20:22:05 +0000 Subject: [PATCH] Refine console output #18 --- apps/raydiance.cpp | 4 ++-- src/config.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/raydiance.cpp b/apps/raydiance.cpp index 862fa81..dee1d7f 100644 --- a/apps/raydiance.cpp +++ b/apps/raydiance.cpp @@ -9,14 +9,14 @@ int main() { std::ofstream imgOut{file::openOutStream("img")}; if (!imgOut.is_open()) { - std::cerr << "Failed to open image file.\n"; + std::cerr << "Failed to open file for writing.\n"; return 1; } std::ifstream sceneConfigFile{"scene.json"}; if (!sceneConfigFile.is_open()) { - std::cerr << "Failed to open scene file.\n"; + std::cerr << "Failed to open scene config file.\n"; return 1; } diff --git a/src/config.cpp b/src/config.cpp index 86399cf..8bb4ba0 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -39,7 +39,7 @@ void config::setCamera(const nlohmann::json &j, camera &cam) { cam.setFocusDistance(cameraConfig["focusDistance"]); } } else { - std::cout << "No camera configuration found, using default values." << std::endl; + std::cout << "No camera configuration found, using default values.\n"; } } @@ -68,6 +68,6 @@ void config::addObjects(const nlohmann::json &j, scene &world) { world.add(std::make_shared(center, radius, mat)); } } else { - std::cout << "No spheres found in the configuration. Was this intended?" << std::endl; + std::cout << "No spheres found in the configuration file. Was this intended?\n"; } }