Skip to content

Commit

Permalink
Merge pull request #12 from posterior/fix-ubuntu-1604
Browse files Browse the repository at this point in the history
Fixes for Ubuntu 1604
  • Loading branch information
fritzo authored Nov 6, 2017
2 parents 795befc + c967122 commit 55ef279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/distributions/timers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# pragma once
#pragma once

#include <distributions/common.hpp>
#include <sys/time.h>
Expand Down
4 changes: 3 additions & 1 deletion include/distributions/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ struct Packed_ : std::vector<Value, Alloc> {

void packed_remove(size_t pos) {
DIST_ASSERT1(pos < Base::size(), "bad pos: " << pos);
Base::operator[](pos) = std::move(Base::back());
if (pos != Base::size() - 1) {
Base::operator[](pos) = std::move(Base::back());
}
Base::pop_back();
}

Expand Down

0 comments on commit 55ef279

Please sign in to comment.