Fixed control flow compiler warning in encoder.hpp.

Fixes warning of "control may reach end of non-void function" in
encoder.hpp that occurs when compiling using clang.

From: TILL TOENSHOFF <toenshoff@me.com>
Review: https://reviews.apache.org/r/16897