Skip to content

Commit

Permalink
Refine console output #18
Browse files Browse the repository at this point in the history
  • Loading branch information
smercer10 committed Feb 27, 2024
1 parent b32fbd4 commit 37e23ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/raydiance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

Expand Down Expand Up @@ -68,6 +68,6 @@ void config::addObjects(const nlohmann::json &j, scene &world) {
world.add(std::make_shared<class sphere>(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";
}
}

0 comments on commit 37e23ea

Please sign in to comment.