summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorgraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-29 05:18:23 +0000
committergraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-29 05:18:23 +0000
commit7f56dd65ee706683444b012d0afcfff3e376bfff (patch)
tree9e4045155928f646d0b19107b808d1947a8c52f2 /utils
parentd2963a1e9311da807c7564274738e6289d8066bf (diff)
value_array refactor
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@663 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'utils')
-rwxr-xr-xutils/value_array.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/value_array.h b/utils/value_array.h
index bd6ef27a..12fc9d87 100755
--- a/utils/value_array.h
+++ b/utils/value_array.h
@@ -95,7 +95,7 @@ protected:
sz=0;
}
void alloc(size_type s) {
- array = s==0 ? 0 : A::allocate(s);
+ array=s?A::allocate(s):0;
sz=s;
}
@@ -142,13 +142,11 @@ protected:
}
inline void init(size_type s) {
- sz=s;
- array=s ? A::allocate(s) : 0;
+ alloc(s);
fill();
}
inline void init(size_type s, const_reference t) {
- sz=s;
- array=s ? A::allocate(s) : 0;
+ alloc(s);
fill(t);
}
public: