Skip to content

Commit

Permalink
Remove superfluous cast as size() returns R_xlen_t now (closes #1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Oct 1, 2024
1 parent b5f358a commit 9cac874
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2024-09-29 Dirk Eddelbuettel <edd@debian.org>

* inst/include/Rcpp/vector/Vector.h: Remove a cast as R_xlen_t
is returned now

2024-09-17 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/vector/Vector.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Vector.h: Rcpp R/C++ interface class library -- vectors
//
// Copyright (C) 2010 - 2023 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2024 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -331,7 +331,7 @@ class Vector :
}

inline iterator begin() { return cache.get() ; }
inline iterator end() { return cache.get() + static_cast<int>(size()) ; }
inline iterator end() { return cache.get() + size(); }
inline const_iterator begin() const{ return cache.get_const() ; }
inline const_iterator end() const{ return cache.get_const() + size() ; }
inline const_iterator cbegin() const{ return cache.get_const() ; }
Expand Down

0 comments on commit 9cac874

Please sign in to comment.