File: UserLogParam.cpp

package info (click to toggle)
dasher 4.11%2Bgit20130508.adc653-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 40,248 kB
  • ctags: 5,158
  • sloc: xml: 185,479; cpp: 32,301; sh: 11,207; makefile: 828; ansic: 483
file content (34 lines) | stat: -rw-r--r-- 694 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#include "../Common/Common.h"

#include "UserLogParam.h"

// Track memory leaks on Windows to the line that new'd the memory
#ifdef _WIN32
#ifdef _DEBUG
#define DEBUG_NEW new( _NORMAL_BLOCK, THIS_FILE, __LINE__ )
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif

// Needed so we can sort() vectors of parameters
bool CUserLogParam::ComparePtr(CUserLogParam* pA, CUserLogParam* pB)
{
  if ((pA == NULL) || (pB == NULL))
    return false;
  int iResult = pA->strName.compare(pB->strName);

  if (iResult < 0)
    return true;
  else if (iResult == 0)
  {
    if (pA->strTimeStamp.compare(pB->strTimeStamp) < 0)
      return true;
  }

  return false;
}