Skip to content

Commit

Permalink
sakura-editor#288[auto キーワードを使って iterator 変数の宣言を簡潔にする]で入れてしまった gcc に怒…
Browse files Browse the repository at this point in the history
…られる記述を訂正する

rvalueの非const参照を宣言してはならないという以下エラーの対応

macro/CMacroFactory.cpp:92:37: error: invalid initialization of non-const reference of type 'std::_List_iterator<CMacroManagerBase* (*)(const wchar_t*)>&' from an rvalue of type 'std::__cxx11::list<CMacroManagerBase* (*)(const wchar_t*)>::iterator {aka std::_List_iterator<CMacroManagerBase* (*)(const wchar_t*)>}'
  auto& c_it = m_mMacroCreators.begin();
  • Loading branch information
berryzplus committed Aug 20, 2018
1 parent 25dd45b commit 23c683d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sakura_core/macro/CMacroFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool CMacroFactory::RegisterCreator( Creator f )
bool CMacroFactory::Unregister( Creator f )
{
// Creator Listからの削除
auto& c_it = m_mMacroCreators.begin();
auto c_it = m_mMacroCreators.begin();
while( c_it != m_mMacroCreators.end() ){
if( *c_it == f ){
// いきなり削除するとiteratorが無効になるので,
Expand Down

0 comments on commit 23c683d

Please sign in to comment.