Skip to content

Commit d6c8e90

Browse files
authored
Merge pull request SpaceGroupUCL#355 from pklampros/keycolumn_name
Make sure the key column actually gets a name
2 parents e3877a6 + d7d06ad commit d6c8e90

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

salalib/attributetable.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
#include <salalib/displayparams.h>
2727
#include <salalib/mgraph_consts.h>
2828

29+
///
30+
/// Namespace to hold known attributes
31+
///
32+
namespace AttributeName {
33+
const char * const REF = "Ref";
34+
}
2935

3036
///
3137
/// Interface to an attribute row
@@ -160,10 +166,7 @@ class AttributeColumnImpl: public AttributeColumn, AttributeColumnStats
160166
class KeyColumn : public AttributeColumnImpl
161167
{
162168
public:
163-
KeyColumn() : AttributeColumnImpl(), m_name("Ref")
164-
{}
165-
private:
166-
std::string m_name;
169+
KeyColumn() : AttributeColumnImpl() { setName(AttributeName::REF); }
167170
};
168171

169172

0 commit comments

Comments
 (0)