1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0030846: Foundation Classes - StorageInfo violates the C++ One Definition Rule

Local definitions have been put into anonymouse namespace within files
OSD_MAllocHook.cxx and NCollection_BaseAllocator.cxx.
This commit is contained in:
kgv
2019-09-04 18:42:42 +03:00
committed by bugmaster
parent 3f50e94e33
commit 9eefb360a7
2 changed files with 63 additions and 87 deletions

View File

@@ -246,29 +246,31 @@ void OSD_MAllocHook::LogFileHandler::Close()
//function : LogFileHandler::MakeReport
//purpose :
//=======================================================================
struct StorageInfo
namespace
{
Standard_Size size;
Standard_Integer nbAlloc;
Standard_Integer nbFree;
Standard_Integer nbLeftPeak;
std::set<unsigned long> alive;
StorageInfo(Standard_Size theSize = 0)
: size (theSize),
nbAlloc (0),
nbFree (0),
nbLeftPeak(0),
alive()
struct StorageInfo
{
}
Standard_Size size;
Standard_Integer nbAlloc;
Standard_Integer nbFree;
Standard_Integer nbLeftPeak;
std::set<unsigned long> alive;
bool operator < (const StorageInfo& theOther) const
{
return size < theOther.size;
}
};
StorageInfo(Standard_Size theSize = 0)
: size (theSize),
nbAlloc (0),
nbFree (0),
nbLeftPeak(0),
alive()
{
}
bool operator < (const StorageInfo& theOther) const
{
return size < theOther.size;
}
};
}
Standard_Boolean OSD_MAllocHook::LogFileHandler::MakeReport
(const char* theLogFile,