]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/mem/FlexibleArray.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / ipc / mem / FlexibleArray.h
index 3a73c899d60ac7753776254bf25a858ee7bfe355..2b6a6c50815f9b42da1a89a08b9411c49155bbe3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -28,7 +28,7 @@ class FlexibleArray
 public:
     explicit FlexibleArray(const int capacity) {
         if (capacity > 1) // the first item is initialized automatically
-            new (items+1) Item[capacity-1];
+            new (raw()+1) Item[capacity-1];
     }
 
     Item &operator [](const int idx) { return items[idx]; }