summaryrefslogtreecommitdiff
path: root/utils/indices_after.h
diff options
context:
space:
mode:
authorgraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-15 03:35:23 +0000
committergraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-15 03:35:23 +0000
commit695ee5c0b87365857925ecb53a45b97ba4582974 (patch)
tree6e5f87c7bfa4a97b09d3a4bb9f2909e41bde1118 /utils/indices_after.h
parent09bbe07fedcdf74f9d0bb28510fe5f3bf0748f6a (diff)
warning
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@551 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'utils/indices_after.h')
-rwxr-xr-xutils/indices_after.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/indices_after.h b/utils/indices_after.h
index 2891563c..62683f39 100755
--- a/utils/indices_after.h
+++ b/utils/indices_after.h
@@ -47,8 +47,8 @@ unsigned new_indices_keep_if_n(unsigned n,It i,KeepIf const& r,O out)
}
template <class KEEP,class O>
-unsigned new_indices(KEEP keep,O out) {
- return new_indices(keep.begin(),keep.end(),out);
+unsigned new_indices_keep(KEEP keep,O out) {
+ return new_indices_keep(keep.begin(),keep.end(),out);
}
template <class V,class Out,class Permi>
@@ -129,8 +129,10 @@ struct indices_after
if (n_mapped>0) {
map=(unsigned *)::operator new(sizeof(unsigned)*n_mapped);
n_kept=new_indices_keep(i,end,map);
- } else
+ } else {
+ n_kept=0;
map=NULL;
+ }
}
template <class A>
void init(A const& a)
@@ -139,7 +141,7 @@ struct indices_after
}
template <class A>
- indices_after(A const& a)
+ explicit indices_after(A const& a)
{
init(a.begin(),a.end());
}