summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/TabComplete.cpp')
-rw-r--r--SwifTools/TabComplete.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/SwifTools/TabComplete.cpp b/SwifTools/TabComplete.cpp
index b123360..f4ef837 100644
--- a/SwifTools/TabComplete.cpp
+++ b/SwifTools/TabComplete.cpp
@@ -4,12 +4,12 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/TabComplete.h"
+#include <SwifTools/TabComplete.h>
#include <algorithm>
#include <boost/algorithm/string.hpp>
-#include "Swiften/Base/foreach.h"
+#include <Swiften/Base/foreach.h>
namespace Swift {
@@ -28,7 +28,7 @@ void TabComplete::removeWord(const std::string& word) {
std::string TabComplete::completeWord(const std::string& word) {
if (word == lastCompletion_) {
- if (lastCompletionCandidates_.size() != 0) {
+ if (!lastCompletionCandidates_.empty()) {
size_t match = 0;
for (match = 0; match < lastCompletionCandidates_.size(); match++) {
if (lastCompletionCandidates_[match] == lastCompletion_) {
@@ -47,7 +47,7 @@ std::string TabComplete::completeWord(const std::string& word) {
lastCompletionCandidates_.push_back(candidate);
}
}
- lastCompletion_ = lastCompletionCandidates_.size() > 0 ? lastCompletionCandidates_[0] : word;
+ lastCompletion_ = !lastCompletionCandidates_.empty() ? lastCompletionCandidates_[0] : word;
}
return lastCompletion_;
}