Skip to content

STYLE: Remove std::allocator from TestImportImageContainer (Common/test)#3971

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
N-Dekker:Remove-allocator-from-TestImportImageContainer
Mar 21, 2023
Merged

STYLE: Remove std::allocator from TestImportImageContainer (Common/test)#3971
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
N-Dekker:Remove-allocator-from-TestImportImageContainer

Conversation

@N-Dekker
Copy link
Copy Markdown
Contributor

@N-Dekker N-Dekker commented Mar 21, 2023

Replaced the use of std::allocator by the equivalent new Element[] and delete[] statements. Renamed m_MemoryAllocatedByAllocator to m_MemoryAllocatedByTestImportImageContainer.

Aims to simplify the code, and make it easier to upgrade to C++17 and further. C++17 has deprecated the std::allocator::allocate and std::allocator::destroy function calls that are removed with this commit.

Aims to supersede commit "COMP: Replace std::allocator member function calls deprecated in C++17" from pull request #3969

For the record, std::allocator was added to TestImportImageContainer with commit 1a3d16d, by Tom Vercauteren (@tvercaut), April 2, 2009.

Replaced the use of `std::allocator` by the equivalent `new Element[]` and
`delete[]` statements. Renamed `m_MemoryAllocatedByAllocator` to
`m_MemoryAllocatedByTestImportImageContainer`.

Aims to simplify the code, and make it easier to upgrade to C++17 and further.
C++17 has deprecated the `std::allocator::allocate` and
`std::allocator::destroy` function calls that are removed with this commit.
@N-Dekker N-Dekker marked this pull request as ready for review March 21, 2023 16:11
@N-Dekker
Copy link
Copy Markdown
Contributor Author

N-Dekker commented Mar 21, 2023

I think this PR is ready, but Label PRs / build (pull_request_target) has failed, saying:

go: gopkg.in/check.v1@v1.0.0-20180628173108-788fd7840127: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/7e5fa1eab4705eb80c9746632736cea906708d060702d529df6241d1c8c2c9f9: exit status 128:
error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
fatal: the remote end hung up unexpectedly

Error: Docker build failed with exit code 1

Do you have a clue?

@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Mar 21, 2023

I assume that some dependency in that GitHub action has broken again.

@dzenanz dzenanz merged commit 55fb520 into InsightSoftwareConsortium:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants