Changeset 10772 for code/branches/cpp11_v2
- Timestamp:
- Nov 7, 2015, 5:38:21 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/Game.cc
r10771 r10772 123 123 124 124 // The empty root state is ALWAYS loaded! 125 this->rootStateNode_ = std::shared_ptr<GameStateTreeNode>( new GameStateTreeNode());125 this->rootStateNode_ = std::shared_ptr<GameStateTreeNode>(std::make_shared<GameStateTreeNode>()); 126 126 this->rootStateNode_->name_ = "emptyRootGameState"; 127 127 this->loadedTopStateNode_ = this->rootStateNode_; … … 490 490 if (tokens[i] == this->rootStateNode_->name_) 491 491 ThrowException(GameState, "You shouldn't use 'emptyRootGameState' in the hierarchy..."); 492 std::shared_ptr<GameStateTreeNode> node( new GameStateTreeNode());492 std::shared_ptr<GameStateTreeNode> node(std::make_shared<GameStateTreeNode>()); 493 493 node->name_ = tokens[i]; 494 494 node->parent_ = currentNode; -
code/branches/cpp11_v2/src/libraries/core/Game.h
r10771 r10772 136 136 public: 137 137 std::shared_ptr<GameState> fabricateInternal(const GameStateInfo& info) 138 { return std::shared_ptr<GameState>( new T(info)); }138 { return std::shared_ptr<GameState>(std::make_shared<T>(info)); } 139 139 }; 140 140 -
code/branches/cpp11_v2/src/libraries/core/Loader.cc
r10771 r10772 73 73 std::string xmlInput; 74 74 75 std::shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> lineTrace( new std::vector<std::vector<std::pair<std::string, size_t>>>());75 std::shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> lineTrace(std::make_shared<std::vector<std::vector<std::pair<std::string, size_t>>>>()); 76 76 lineTrace->reserve(1000); //arbitrary number 77 77 -
code/branches/cpp11_v2/src/libraries/core/Resource.cc
r10771 r10772 95 95 if (it->filename == name) 96 96 { 97 std::shared_ptr<ResourceInfo> ptr( new ResourceInfo());97 std::shared_ptr<ResourceInfo> ptr(std::make_shared<ResourceInfo>()); 98 98 ptr->filename = name; 99 99 ptr->path = it->path; -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
r10771 r10772 188 188 { 189 189 while (joyStickAxes_.size() < joySticks_.size()) 190 joyStickAxes_.push_back(std::shared_ptr<JoyStickAxisVector>( new JoyStickAxisVector()));190 joyStickAxes_.push_back(std::shared_ptr<JoyStickAxisVector>(std::make_shared<JoyStickAxisVector>())); 191 191 while (joyStickButtons_.size() < joySticks_.size()) 192 joyStickButtons_.push_back(std::shared_ptr<JoyStickButtonVector>( new JoyStickButtonVector()));192 joyStickButtons_.push_back(std::shared_ptr<JoyStickButtonVector>(std::make_shared<JoyStickButtonVector>())); 193 193 // For the case the new size is smaller 194 194 this->joyStickAxes_.resize(joySticks_.size());
Note: See TracChangeset
for help on using the changeset viewer.