WIP: Whenever an image fails to load, it is defaulted to a 32x32 Fuchsia bitmap.
Random review. Closes #323.
Merge request reports
Activity
added 1 commit
- cdedeefe - Attempt fixing cpplint.
By Ali Can Demiralp on 2018-03-20T17:58:46 (imported from GitLab)
added 1 commit
- c385a05a - Double braces to fix cpplint.
By Ali Can Demiralp on 2018-03-20T18:06:41 (imported from GitLab)
- We have code which requires invalid images in test_reference_images.
- We no longer have invalid images. They are defaulted instead.
- Do I remove that part of the test?
By Ali Can Demiralp on 2018-03-21T16:15:25 (imported from GitLab)
Edited by Jan DelemberI really cannot figure out how to update the test for this case. It relies on the fact that the pointer returned by the ResourceManager is nullptr, which no longer is the case. I tried reading the failing section for the last 15 minutes and did not understand anything from it. Can someone who worked on OpenGLBufferData do this?
By Ali Can Demiralp on 2018-04-04T12:52:00 (imported from GitLab)
41 43 declaration.dump()); 42 44 return nullptr; 43 45 } 44 auto image = 45 std::make_unique<Image>(declaration["file_name"].get<std::string>()); 46 47 auto filepath = declaration["file_name"].get<std::string>(); 48 49 std::unique_ptr<Image> image; 50 if (boost::filesystem::exists(filepath.c_str())) FreeImage does not check whether a file is corrupt either (and it is not its job to do so), and crashes in that case. Which means the previous logic did not really change.
Aside from this, boost::filesystem probably offers options for checking whether a file is valid. I will look into this.
By Ali Can Demiralp on 2018-03-27T11:37:02 (imported from GitLab)
I'll close this, due to this now being implemented in !150 (merged)
By Jonathan Ehret on 2018-07-10T14:45:10 (imported from GitLab)