[ruby] use std::vector::back() method.
This commit is contained in:
parent
042d8289fd
commit
cc4e3aec52
1 changed files with 3 additions and 1 deletions
|
|
@ -3,6 +3,8 @@
|
|||
%{
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class C;
|
||||
%}
|
||||
|
||||
%include <std_shared_ptr.i>
|
||||
|
|
@ -38,7 +40,7 @@ public:
|
|||
}
|
||||
|
||||
bool is_last_null(const std::vector<std::shared_ptr<C> >& v) {
|
||||
if( *v.end() ) {
|
||||
if( v.back() ) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue