mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
use static class variable rather then static function variable
This commit is contained in:
parent
76e6aaecb1
commit
feb74d49c2
@ -5768,6 +5768,7 @@ namespace netgen
|
||||
materials.Elem(domnr) = new string(mat);
|
||||
}
|
||||
|
||||
string Mesh :: defaultmat = "default";
|
||||
const string & Mesh :: GetMaterial (int domnr) const
|
||||
{
|
||||
if (domnr <= materials.Size())
|
||||
|
@ -593,9 +593,9 @@ namespace netgen
|
||||
DLL_HEADER void SetMaterial (int domnr, const string & mat);
|
||||
///
|
||||
const string & GetMaterial (int domnr) const;
|
||||
static string defaultmat;
|
||||
const string * GetMaterialPtr (int domnr) const // 1-based
|
||||
{
|
||||
static string defaultmat = "default";
|
||||
return domnr <= materials.Size() ? materials.Get(domnr) : &defaultmat;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user