bcname inline

This commit is contained in:
Joachim Schöberl 2016-03-23 23:13:05 +01:00
parent d801222dbf
commit 3057076eaf
2 changed files with 7 additions and 4 deletions

View File

@ -2326,13 +2326,15 @@ namespace netgen
tlosurf == seg.tlosurf+1; tlosurf == seg.tlosurf+1;
} }
string FaceDescriptor :: default_bcname = "default";
/*
const string & FaceDescriptor :: GetBCName () const const string & FaceDescriptor :: GetBCName () const
{ {
static string defaultstring = "default"; static string defaultstring = "default";
if (bcname) return *bcname; if (bcname) return *bcname;
return defaultstring; return defaultstring;
} }
*/
/* /*
void FaceDescriptor :: SetBCName (string * bcn) void FaceDescriptor :: SetBCName (string * bcn)

View File

@ -937,9 +937,10 @@ namespace netgen
// other face data // other face data
/// surface colour (Default: R=0.0 ; G=1.0 ; B=0.0) /// surface colour (Default: R=0.0 ; G=1.0 ; B=0.0)
Vec3d surfcolour; Vec3d surfcolour;
/// ///
string * bcname; static string default_bcname;
string * bcname = &default_bcname;
/// root of linked list /// root of linked list
SurfaceElementIndex firstelement; SurfaceElementIndex firstelement;
@ -968,7 +969,7 @@ namespace netgen
// Philippose - 06/07/2009 // Philippose - 06/07/2009
// Get Surface colour // Get Surface colour
Vec3d SurfColour () const { return surfcolour; } Vec3d SurfColour () const { return surfcolour; }
DLL_HEADER const string & GetBCName () const; DLL_HEADER const string & GetBCName () const { return *bcname; }
// string * BCNamePtr () { return bcname; } // string * BCNamePtr () { return bcname; }
// const string * BCNamePtr () const { return bcname; } // const string * BCNamePtr () const { return bcname; }
void SetSurfNr (int sn) { surfnr = sn; } void SetSurfNr (int sn) { surfnr = sn; }