diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-12-08 14:27:40 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-12-08 14:27:40 -0500 |
commit | b6dc755786fb06ab109eb36f402a25edaf24ce14 (patch) | |
tree | 04f465dd42a555f15bf2729ad4a2fcea181db1c9 /indra/llcommon/llheteromap.cpp | |
parent | 5bb456d80cfbcdfe87526510f3b8297d315afdd8 (diff) | |
parent | a65b586b184d9837e0586b4df0d2e758ccce63f6 (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-skip-llcorehttp-test
Diffstat (limited to 'indra/llcommon/llheteromap.cpp')
-rw-r--r-- | indra/llcommon/llheteromap.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/llcommon/llheteromap.cpp b/indra/llcommon/llheteromap.cpp new file mode 100644 index 0000000000..7c19196e0c --- /dev/null +++ b/indra/llcommon/llheteromap.cpp @@ -0,0 +1,32 @@ +/** + * @file llheteromap.cpp + * @author Nat Goodspeed + * @date 2016-10-12 + * @brief Implementation for llheteromap. + * + * $LicenseInfo:firstyear=2016&license=viewerlgpl$ + * Copyright (c) 2016, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "llheteromap.h" +// STL headers +// std headers +// external library headers +// other Linden headers + +LLHeteroMap::~LLHeteroMap() +{ + // For each entry in our map, we must call its deleter, which is the only + // record we have of its original type. + for (TypeMap::iterator mi(mMap.begin()), me(mMap.end()); mi != me; ++mi) + { + // mi->second is the std::pair; mi->second.first is the void*; + // mi->second.second points to the deleter function + (mi->second.second)(mi->second.first); + mi->second.first = NULL; + } +} |