diff --git a/moses/WordsBitmap.cpp b/moses/WordsBitmap.cpp index 4ac2625b9..17340ffac 100644 --- a/moses/WordsBitmap.cpp +++ b/moses/WordsBitmap.cpp @@ -28,20 +28,10 @@ TO_STRING_BODY(WordsBitmap); bool WordsBitmap::IsAdjacent(size_t startPos, size_t endPos) const { - if (GetNumWordsCovered() == 0) { - return true; - } - - size_t first = GetFirstGapPos(); - size_t last = GetLastGapPos(); - - if (startPos == last || endPos == first) { - return true; - } - - return false; + return + GetNumWordsCovered() == 0 || + startPos == GetFirstGapPos() || + endPos == GetLastGapPos(); } - } -