Jump to content
  • 0

Shop_Ex Renewal Error


alexghinet

Question

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 post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • 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.