mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-14 20:59:23 +08: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:
+22
-20
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user