forked from mia/Aegisub
Remove some redundant .get()s
This commit is contained in:
parent
def24c25b3
commit
7300a1bf2d
6 changed files with 6 additions and 6 deletions
|
@ -53,7 +53,7 @@ Thesaurus::~Thesaurus() { }
|
|||
|
||||
std::vector<Thesaurus::Entry> Thesaurus::Lookup(std::string const& word) {
|
||||
std::vector<Entry> out;
|
||||
if (!dat.get()) return out;
|
||||
if (!dat) return out;
|
||||
|
||||
auto it = offsets.find(word);
|
||||
if (it == offsets.end()) return out;
|
||||
|
|
|
@ -109,7 +109,7 @@ template<> agi::Color AssOverrideParameter::Get<agi::Color>() const {
|
|||
}
|
||||
|
||||
template<> AssDialogueBlockOverride *AssOverrideParameter::Get<AssDialogueBlockOverride*>() const {
|
||||
if (!block.get()) {
|
||||
if (!block) {
|
||||
block = agi::make_unique<AssDialogueBlockOverride>(Get<std::string>());
|
||||
block->ParseTags();
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
|||
|
||||
// List of supported spellchecker languages
|
||||
{
|
||||
if (!spellchecker.get()) {
|
||||
if (!spellchecker) {
|
||||
wxMessageBox("No spellchecker available.", "Error", wxOK | wxICON_ERROR | wxCENTER);
|
||||
throw agi::UserCancelException("No spellchecker available");
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ Thesaurus::~Thesaurus() {
|
|||
}
|
||||
|
||||
std::vector<Thesaurus::Entry> Thesaurus::Lookup(std::string word) {
|
||||
if (!impl.get()) return {};
|
||||
if (!impl) return {};
|
||||
boost::to_lower(word);
|
||||
return impl->Lookup(word);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ void ToolTipManager::Bind(wxWindow *window, wxString tooltip, const char *contex
|
|||
}
|
||||
|
||||
void ToolTipBinding::Update() {
|
||||
if (!window.get()) return;
|
||||
if (!window) return;
|
||||
|
||||
std::vector<std::string> hotkeys = hotkey::get_hotkey_strs(context, command);
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ void VideoDisplay::OnMouseWheel(wxMouseEvent& event) {
|
|||
}
|
||||
|
||||
void VideoDisplay::OnContextMenu(wxContextMenuEvent&) {
|
||||
if (!context_menu.get()) context_menu = menu::GetMenu("video_context", con);
|
||||
if (!context_menu) context_menu = menu::GetMenu("video_context", con);
|
||||
SetCursor(wxNullCursor);
|
||||
menu::OpenPopupMenu(context_menu.get(), this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue