mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-03 12:40:10 +00:00
Merge
This commit is contained in:
commit
4ca382aeee
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -169,7 +169,9 @@ template<class E> class GrowableArray : public GenericGrowableArray {
|
||||
: GenericGrowableArray(initial_size, 0, C_heap, F) {
|
||||
_data = (E*)raw_allocate(sizeof(E));
|
||||
// Needed for Visual Studio 2012 and older
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(suppress: 4345)
|
||||
#endif
|
||||
for (int i = 0; i < _max; i++) ::new ((void*)&_data[i]) E();
|
||||
}
|
||||
|
||||
@ -422,7 +424,9 @@ template<class E> void GrowableArray<E>::grow(int j) {
|
||||
int i = 0;
|
||||
for ( ; i < _len; i++) ::new ((void*)&newData[i]) E(_data[i]);
|
||||
// Needed for Visual Studio 2012 and older
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(suppress: 4345)
|
||||
#endif
|
||||
for ( ; i < _max; i++) ::new ((void*)&newData[i]) E();
|
||||
for (i = 0; i < old_max; i++) _data[i].~E();
|
||||
if (on_C_heap() && _data != NULL) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user