initialize valarrays with explicit contents (zero)
[zxing.git] / cpp / core / src / common / GridSampler.cpp
index dc83409..4fa57fc 100644 (file)
@@ -3,7 +3,7 @@
  *  zxing
  *
  *  Created by Christian Brunschen on 18/05/2008.
- *  Copyright 2008 Google Inc. All rights reserved.
+ *  Copyright 2008 ZXing authors All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ namespace common {
       p1FromX, p1FromY, p2FromX, p2FromY, p3FromX, p3FromY, p4FromX, p4FromY));
     
     Ref<BitMatrix> bits(new BitMatrix(dimension));
-    valarray<float> points(dimension << 1);
+    valarray<float> points((const float)0.0f, dimension << 1);
     for (int i = 0; i < dimension; i++) {
       int max = points.size();
       float iValue = (float) i + 0.5f;