Skip to content

Commit 06dee56

Browse files
Troels Dalsgaard HoffmeyerTroels Dalsgaard Hoffmeyer
authored andcommitted
Revert "Remove volatile keyword from function argument"
This reverts commit 1aa5e0e.
1 parent fb49866 commit 06dee56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/json/allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ template <typename T> class SecureAllocator {
3838
* The pointer argument is tagged as "volatile" to prevent the
3939
* compiler optimizing out this critical step.
4040
*/
41-
void deallocate(pointer p, size_type n) {
41+
void deallocate(volatile pointer p, size_type n) {
4242
std::memset(p, 0, n * sizeof(T));
4343
// free using "global operator delete"
4444
::operator delete(p);

0 commit comments

Comments
 (0)