MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / load

Method load

source/entities/Weapon.cpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include <fstream>
28
29Weapon* Weapon::load(std::stringstream& defFile)
30{
31 if (!defFile.good())
32 return nullptr;
33
34 Weapon* weapon = new Weapon();
35 if(!update(weapon, defFile))
36 {
37 delete weapon;
38 weapon = nullptr;
39 }
40 return weapon;
41}
42bool Weapon::update(Weapon* weapon, std::stringstream& defFile)
43{
44 std::string nextParam;

Callers 3

setupOgreResourcesMethod · 0.45
MiniMapDrawnMethod · 0.45
MiniMapDrawnFullMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected