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
commit5677e567a1f1bc098e794440c60164792000b3c5 (patch)
tree852ffbd54b40af7fba58923d26d40f3c621ca715 /utils
parent810111b543df53f85bfe5722db79870ca00b1a3e (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: