Skip to content

Commit

Permalink
AURORA: Add LocString::empty()
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Dec 28, 2016
1 parent dd99976 commit a32e5fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aurora/locstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ void LocString::clear() {
_strings.clear();
}

bool LocString::empty() const {
return (_id == kStrRefInvalid) && (_strings.empty() || getString().empty());
}

void LocString::swap(LocString &str) {
SWAP(_id, str._id);

Expand Down
3 changes: 3 additions & 0 deletions src/aurora/locstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class LocString {

void clear();

/** Is this localized string empty, without any strings whatsoever? */
bool empty() const;

/** Swap the contents of the LocString with this LocString's. */
void swap(LocString &str);

Expand Down

0 comments on commit a32e5fa

Please sign in to comment.