aboutsummaryrefslogtreecommitdiff
path: root/include/Body.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Body.hpp')
-rw-r--r--include/Body.hpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 1952b74..f4742bc 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -39,21 +39,21 @@ namespace QuickMedia {
static std::shared_ptr<BodyItem> create(std::string title) { return std::make_shared<BodyItem>(std::move(title)); }
void set_title(std::string new_title) {
- if(title.empty() && new_title.empty())
+ if(title == new_title)
return;
title = std::move(new_title);
dirty = true;
}
void set_description(std::string new_description) {
- if(description.empty() && new_description.empty())
+ if(description == new_description)
return;
description = std::move(new_description);
dirty_description = true;
}
void set_author(std::string new_author) {
- if(author.empty() && new_author.empty())
+ if(author == new_author)
return;
author = std::move(new_author);
dirty_author = true;
@@ -68,24 +68,24 @@ namespace QuickMedia {
}
void set_title_color(sf::Color new_color) {
- if(new_color != title_color) {
- title_color = new_color;
- dirty = true;
- }
+ if(new_color == title_color)
+ return;
+ title_color = new_color;
+ dirty = true;
}
void set_description_color(sf::Color new_color) {
- if(new_color != description_color) {
- description_color = new_color;
- dirty_description = true;
- }
+ if(new_color == description_color)
+ return;
+ description_color = new_color;
+ dirty_description = true;
}
void set_author_color(sf::Color new_color) {
- if(new_color != author_color) {
- author_color = new_color;
- dirty_author = true;
- }
+ if(new_color == author_color)
+ return;
+ author_color = new_color;
+ dirty_author = true;
}
const std::string& get_title() const { return title; }