Skip to content

Commit 47a3947

Browse files
code clean-up
1 parent 05c0bcf commit 47a3947

2 files changed

Lines changed: 25 additions & 57 deletions

File tree

rtc/dll/src/set/DataCompare.h

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
1-
//<HEADER>
2-
/*
3-
Data & Model Server (DMS) is a server written in C++ for DSS applications.
4-
Version: see srv/dms/rtc/dll/src/RtcVersion.h for version info.
1+
// Copyright (C) 1998-2024 Object Vision b.v.
2+
// License: GNU GPL 3
3+
/////////////////////////////////////////////////////////////////////////////
54

6-
Copyright (C) 1998-2004 YUSE GSO Object Vision BV.
5+
#if defined(_MSC_VER)
6+
#pragma once
7+
#endif
78

8-
Documentation on using the Data & Model Server software can be found at:
9-
http://www.ObjectVision.nl/DMS/
109

11-
See additional guidelines and notes in srv/dms/Readme-srv.txt
12-
13-
This library is free software; you can use, redistribute, and/or
14-
modify it under the terms of the GNU General Public License version 2
15-
(the License) as published by the Free Software Foundation,
16-
provided that this entire header notice and readme-srv.txt is preserved.
17-
18-
See LICENSE.TXT for terms of distribution or look at our web site:
19-
http://www.objectvision.nl/DMS/License.txt
20-
or alternatively at: http://www.gnu.org/copyleft/gpl.html
21-
22-
This library is distributed in the hope that it will be useful,
23-
but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25-
General Public License for more details. However, specific warranties might be
26-
granted by an additional written contract for support, assistance and/or development
27-
*/
28-
//</HEADER>
2910
#if !defined(__RTC_SET_DATACOMPARE_H)
3011
#define __RTC_SET_DATACOMPARE_H
3112

rtc/dll/src/set/IndexCompare.h

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
1-
//<HEADER>
2-
/*
3-
Data & Model Server (DMS) is a server written in C++ for DSS applications.
4-
Version: see srv/dms/rtc/dll/src/RtcVersion.h for version info.
1+
// Copyright (C) 1998-2024 Object Vision b.v.
2+
// License: GNU GPL 3
3+
/////////////////////////////////////////////////////////////////////////////
54

6-
Copyright (C) 1998-2004 YUSE GSO Object Vision BV.
7-
8-
Documentation on using the Data & Model Server software can be found at:
9-
http://www.ObjectVision.nl/DMS/
10-
11-
See additional guidelines and notes in srv/dms/Readme-srv.txt
12-
13-
This library is free software; you can use, redistribute, and/or
14-
modify it under the terms of the GNU General Public License version 2
15-
(the License) as published by the Free Software Foundation,
16-
provided that this entire header notice and readme-srv.txt is preserved.
17-
18-
See LICENSE.TXT for terms of distribution or look at our web site:
19-
http://www.objectvision.nl/DMS/License.txt
20-
or alternatively at: http://www.gnu.org/copyleft/gpl.html
21-
22-
This library is distributed in the hope that it will be useful,
23-
but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25-
General Public License for more details. However, specific warranties might be
26-
granted by an additional written contract for support, assistance and/or development
27-
*/
28-
//</HEADER>
5+
#if defined(_MSC_VER)
6+
#pragma once
7+
#endif
298

309
#if !defined(__RTC_SET_INDEXCOMPARE_H)
3110
#define __RTC_SET_INDEXCOMPARE_H
@@ -39,14 +18,22 @@ granted by an additional written contract for support, assistance and/or develop
3918
template <typename CI, typename E = SizeT>
4019
struct IndexCompareOper
4120
{
42-
IndexCompareOper(CI dataBegin): m_DataBegin(dataBegin) {}
43-
bool operator ()(E left, E right)
21+
using index_type = E;
22+
using value_array_begin_type = CI;
23+
using value_type = typename std::iterator_traits<value_array_begin_type>::value_type;
24+
25+
IndexCompareOper(value_array_begin_type dataBegin)
26+
: m_DataBegin(dataBegin)
27+
{}
28+
29+
bool operator ()(index_type left, index_type right) const
4430
{
4531
return m_DataComp(m_DataBegin[left], m_DataBegin[right]);
4632
}
47-
typedef typename std::iterator_traits<CI>::value_type value_type;
48-
CI m_DataBegin;
49-
DataCompare<value_type> m_DataComp;
33+
34+
value_array_begin_type m_DataBegin;
35+
36+
DataCompare<value_type> m_DataComp = {};
5037
};
5138

5239

0 commit comments

Comments
 (0)