diff --git a/openVulkanoCpp/IO/Files/Pnm.hpp b/openVulkanoCpp/IO/Files/Pnm.hpp index 99e8e96..f0995b4 100644 --- a/openVulkanoCpp/IO/Files/Pnm.hpp +++ b/openVulkanoCpp/IO/Files/Pnm.hpp @@ -88,20 +88,20 @@ namespace OpenVulkano pnmHeader.ascii = val < 4; pnmHeader.color = static_cast(val - 3); - if (!(inStream >> pnmHeader.width >> pnmHeader.height)) + if (!(inStream >> pnmHeader.width >> pnmHeader.height)) [[unlikely]] { throw std::runtime_error("Malformed PNM header: Unable to read width and height!"); } - if (pnmHeader.width == 0 || pnmHeader.height == 0) + if (pnmHeader.width == 0 || pnmHeader.height == 0) [[unlikely]] { throw std::runtime_error("Malformed PNM header: Width and height must be positive!"); } - if (!(inStream >> pnmHeader.maxValue)) + if (!(inStream >> pnmHeader.maxValue)) [[unlikely]] { throw std::runtime_error("Malformed PNM header: Unable to read maxValue!"); } - if (pnmHeader.maxValue == 0 || pnmHeader.maxValue > 65535) + if (pnmHeader.maxValue == 0 || pnmHeader.maxValue > 65535) [[unlikely]] { throw std::runtime_error("Malformed PNM header: Invalid maxValue (must be between 1 and 65535)!"); }