Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 7, 2015, 5:24:58 PM (9 years ago)
Author:
landauf
Message:

using std::shared_ptr instead of boost::shared_ptr (same for weak_ptr)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/LuaState.cc

    r10769 r10771  
    7979    }
    8080
    81     shared_ptr<ResourceInfo> LuaState::getFileInfo(const std::string& filename)
     81    std::shared_ptr<ResourceInfo> LuaState::getFileInfo(const std::string& filename)
    8282    {
    8383        // Look in the current directory first
    84         shared_ptr<ResourceInfo> sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename);
     84        std::shared_ptr<ResourceInfo> sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename);
    8585        // Continue search in root directories
    8686        if (sourceInfo == nullptr && !sourceFileInfo_->path.empty())
     
    9191    bool LuaState::includeFile(const std::string& filename)
    9292    {
    93         shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
     93        std::shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    9494        if (sourceInfo != nullptr)
    9595            return this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
     
    101101    }
    102102
    103     bool LuaState::includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
     103    bool LuaState::includeString(const std::string& code, const std::shared_ptr<ResourceInfo>& sourceFileInfo)
    104104    {
    105105        // Parse string with provided include parser (otherwise don't preparse at all)
     
    131131    bool LuaState::doFile(const std::string& filename)
    132132    {
    133         shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
     133        std::shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    134134        if (sourceInfo != nullptr)
    135135            return this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
     
    141141    }
    142142
    143     bool LuaState::doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
     143    bool LuaState::doString(const std::string& code, const std::shared_ptr<ResourceInfo>& sourceFileInfo)
    144144    {
    145145        // Save the old source file info
    146         shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
     146        std::shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
    147147        // Only override if sourceFileInfo provides useful information
    148148        if (sourceFileInfo != nullptr)
     
    285285    bool LuaState::fileExists(const std::string& filename)
    286286    {
    287         shared_ptr<ResourceInfo> info = this->getFileInfo(filename);
     287        std::shared_ptr<ResourceInfo> info = this->getFileInfo(filename);
    288288        if (info == nullptr)
    289289            return false;
     
    300300        if (it != this->sourceCodeMap_.end())
    301301            return it->second;
    302         shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
     302        std::shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
    303303        if (info == nullptr)
    304304            return "";
Note: See TracChangeset for help on using the changeset viewer.