Fixes C++ SendableChooser using invalid temp variable (#945)

This commit is contained in:
Thad House
2018-02-15 23:00:46 -08:00
committed by Peter Johnson
parent f5a292dadd
commit 57e9fb33d2

View File

@@ -62,7 +62,7 @@ void SendableChooser<T>::AddDefault(llvm::StringRef name, T object) {
template <class T>
auto SendableChooser<T>::GetSelected()
-> decltype(_unwrap_smart_ptr(m_choices[""])) {
llvm::StringRef selected = m_defaultChoice;
std::string selected = m_defaultChoice;
if (m_selectedEntry) {
selected = m_selectedEntry.GetString(m_defaultChoice);
}