Jump to content

Shop_Ex Renewal Error


Recommended Posts

Can someone help me with this error in shop_manager.cpp  please? 

 

shopmanager.cpp 

 

#ifdef ENABLE_RENEWAL_SHOPEX
    {
        std::unordered_set<CShop*> v;
        // include unordered_set
        auto ExDelete = [&v](TShopMap& c) {
            for (auto it = c.begin(); !c.empty() && it != c.end();) {
                const auto shop = it->second;
                if (shop && shop->IsShopEx()) {
                    it = c.erase(it);
                    v.insert(shop);
                }
                else
                    ++it;
            }
        };
        ExDelete(m_map_pkShopByNPCVnum);
        ExDelete(m_map_pkShop);
        for (const auto& del : v)
            delete del;
    }
#endif

 

shop_manager.cpp: In member function 'bool CShopManager::ReadShopTableEx(const char*, bool)':
shop_manager.cpp:826:3: error: 'unordered_set' is not a member of 'std'
   std::unordered_set<CShop*> v;
   ^
shop_manager.cpp:826:3: note: suggested alternatives:
In file included from /usr/local/lib/gcc49/include/c++/tr1/unordered_set:42:0,
                 from stdafx.h:27,
                 from shop_manager.cpp:1:
/usr/local/lib/gcc49/include/c++/tr1/unordered_set.h:173:11: note:   'std::tr1::unordered_set'
     class unordered_set
           ^
In file included from ../../../Extern/include/boost/unordered/unordered_set.hpp:16:0,
                 from shop_manager.cpp:28:
../../../Extern/include/boost/unordered/unordered_set_fwd.hpp:24:11: note:   'boost::unordered_set'
     class unordered_set;
           ^
shop_manager.cpp:826:27: error: expected primary-expression before '*' token
   std::unordered_set<CShop*> v;
                           ^
shop_manager.cpp:826:28: error: expected primary-expression before '>' token
   std::unordered_set<CShop*> v;
                            ^
shop_manager.cpp:826:30: error: 'v' was not declared in this scope
   std::unordered_set<CShop*> v;
                              ^
shop_manager.cpp:841:26: error: unable to deduce 'auto&&' from 'v'
   for (const auto& del : v)
                          ^
shop_manager.cpp:842:11: error: type '<type error>' argument given to 'delete', expected pointer
    delete del;
           ^

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.