MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / GetSource

Method GetSource

lib/utils/source-selection.cpp:67–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67OBSWeakSource SourceSelection::GetSource() const
68{
69 switch (_type) {
70 case Type::SOURCE:
71 return _source;
72 case Type::VARIABLE: {
73 auto var = _variable.lock();
74 if (!var) {
75 return nullptr;
76 }
77 return GetWeakSourceByName(var->Value().c_str());
78 }
79 default:
80 break;
81 }
82 return nullptr;
83}
84
85void SourceSelection::SetSource(OBSWeakSource source)
86{

Callers

nothing calls this directly

Calls 3

GetWeakSourceByNameFunction · 0.85
c_strMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected