File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ int main()
5252 constexpr auto initial_iteration_limit = 250 ;
5353 constexpr auto max_extent = 4 * initial_extent;
5454
55- auto image = sf::Image ();
56- image.create ({ length, length });
55+ auto image = sf::Image ({ length, length });
5756
5857 auto origin = initial_origin;
5958 auto extent = initial_extent;
@@ -62,9 +61,7 @@ int main()
6261 auto clock = sf::Clock ();
6362 auto recalculate = true ;
6463 auto texture = sf::Texture ();
65- auto font = sf::Font ();
66- if (!font.loadFromFile (" data/font.ttf" ))
67- throw std::runtime_error (" Failed to load font" );
64+ const auto font = sf::Font::loadFromFile (" data/font.ttf" ).value ();
6865
6966 auto text = sf::Text (font, " " , 24 );
7067 text.setFillColor (sf::Color::White);
You can’t perform that action at this time.
0 commit comments