Fixed errors and warnings from Clang 3.6. The minimum required clang version has been reduced from 3.7 to 3.6.
parent
3911530e4e
commit
d8bf087373
|
@ -57,7 +57,7 @@ namespace tgui
|
|||
|
||||
Color::Color(const std::string& string) :
|
||||
m_isSet{true},
|
||||
m_color{Deserializer::deserialize(tgui::ObjectConverter::Type::Color, string).getColor()}
|
||||
m_color(Deserializer::deserialize(tgui::ObjectConverter::Type::Color, string).getColor()) // Did not compile with clang 3.6 when using braces
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ namespace tgui
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Font::Font(const std::string& id) :
|
||||
m_font{Deserializer::deserialize(ObjectConverter::Type::Font, id).getFont()},
|
||||
m_id {Deserializer::deserialize(ObjectConverter::Type::String, id).getString()}
|
||||
m_font(Deserializer::deserialize(ObjectConverter::Type::Font, id).getFont()), // Did not compile with clang 3.6 when using braces
|
||||
m_id (Deserializer::deserialize(ObjectConverter::Type::String, id).getString()) // Did not compile with clang 3.6 when using braces
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -515,7 +515,7 @@ TEST_CASE("[Sprite]")
|
|||
{
|
||||
sprite.getTexture().setSmooth(false);
|
||||
|
||||
const tgui::Sprite sprite2;
|
||||
const tgui::Sprite sprite2{};
|
||||
sprite2.getTexture().isSmooth();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,19 +58,19 @@ TEST_CASE("[HorizontalWrap]")
|
|||
REQUIRE(pic3->getPosition() == sf::Vector2f(0, 50));
|
||||
REQUIRE(pic4->getPosition() == sf::Vector2f(60, 50));
|
||||
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets({20});
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets(20);
|
||||
REQUIRE(pic1->getPosition() == sf::Vector2f(0, 0));
|
||||
REQUIRE(pic2->getPosition() == sf::Vector2f(70, 0));
|
||||
REQUIRE(pic3->getPosition() == sf::Vector2f(0, 60));
|
||||
REQUIRE(pic4->getPosition() == sf::Vector2f(70, 60));
|
||||
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets({21});
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets(21);
|
||||
REQUIRE(pic1->getPosition() == sf::Vector2f(0, 0));
|
||||
REQUIRE(pic2->getPosition() == sf::Vector2f(0, 61));
|
||||
REQUIRE(pic3->getPosition() == sf::Vector2f(0, 122));
|
||||
REQUIRE(pic4->getPosition() == sf::Vector2f(0, 183));
|
||||
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets({20});
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets(20);
|
||||
wrap->removeAllWidgets();
|
||||
|
||||
auto pic5 = tgui::Picture::copy(pic);
|
||||
|
@ -126,7 +126,7 @@ TEST_CASE("[HorizontalWrap]")
|
|||
|
||||
SECTION("Saving and loading from file")
|
||||
{
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets({20});
|
||||
wrap->getRenderer()->setSpaceBetweenWidgets(20);
|
||||
|
||||
auto pic = tgui::Picture::create("resources/image.png");
|
||||
pic->setSize({50, 40});
|
||||
|
|
Loading…
Reference in New Issue