mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
[Cleanup] Remove always true statement in say_link.cpp (#3188)
# Notes - This is always true since we check `!saylinks.empty()` prior to this.
This commit is contained in:
parent
beccd557a8
commit
49c093dc62
@ -403,16 +403,14 @@ SaylinkRepository::Saylink EQ::SayLinkEngine::GetOrSaveSaylink(std::string sayli
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if not found in database - save
|
// if not found in database - save
|
||||||
if (saylinks.empty()) {
|
auto new_saylink = SaylinkRepository::NewEntity();
|
||||||
auto new_saylink = SaylinkRepository::NewEntity();
|
new_saylink.phrase = saylink_text;
|
||||||
new_saylink.phrase = saylink_text;
|
|
||||||
|
|
||||||
// persist to database
|
// persist to database
|
||||||
auto link = SaylinkRepository::InsertOne(database, new_saylink);
|
auto link = SaylinkRepository::InsertOne(database, new_saylink);
|
||||||
if (link.id > 0) {
|
if (link.id > 0) {
|
||||||
g_cached_saylinks.emplace_back(link);
|
g_cached_saylinks.emplace_back(link);
|
||||||
return link;
|
return link;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user