Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 620270 | Differences between
and this patch

Collapse All | Expand All

(-) (-3 / +2 lines)
Line  Link Here
-- a/src/Geoscape/Globe.cpp
Lines 1390-1401 Link Here
1390
1390
1391
	if (fabs(sx)<0.01)
1391
	if (fabs(sx)<0.01)
1392
	{
1392
	{
1393
		seg = abs( sy/(2*M_PI)*48 );
1393
		seg = fabs( sy/(2*M_PI)*48 );
1394
		if (seg == 0) ++seg;
1394
		if (seg == 0) ++seg;
1395
	}
1395
	}
1396
	else
1396
	else
1397
	{
1397
	{
1398
		seg = abs( sx/(2*M_PI)*96 );
1398
		seg = fabs( sx/(2*M_PI)*96 );
1399
		if (seg == 0) ++seg;
1399
		if (seg == 0) ++seg;
1400
	}
1400
	}
1401
1401
(-)a/src/Ruleset/RuleAlienMission.cpp (-10 / +10 lines)
Lines 85-91 Link Here
85
			if (assoc.end() == existing)
85
			if (assoc.end() == existing)
86
			{
86
			{
87
				// New entry, load and add it.
87
				// New entry, load and add it.
88
				std::auto_ptr<WeightedOptions> nw(new WeightedOptions);
88
				std::unique_ptr<WeightedOptions> nw(new WeightedOptions);
89
				nw->load(nn->second);
89
				nw->load(nn->second);
90
				assoc.insert(std::make_pair(month, nw.release()));
90
				assoc.insert(std::make_pair(month, nw.release()));
91
			}
91
			}
92
-- a/src/Ruleset/Ruleset.cpp
92
++ b/src/Ruleset/Ruleset.cpp
Lines 437-443 Link Here
437
		}
437
		}
438
		else
438
		else
439
		{
439
		{
440
			std::auto_ptr<MCDPatch> patch(new MCDPatch());
440
			std::unique_ptr<MCDPatch> patch(new MCDPatch());
441
			patch->load(*i);
441
			patch->load(*i);
442
			_MCDPatches[type] = patch.release();
442
			_MCDPatches[type] = patch.release();
443
			_MCDPatchesIndex.push_back(type);
443
			_MCDPatchesIndex.push_back(type);
Lines 446-452 Link Here
446
 	for (YAML::const_iterator i = doc["extraSprites"].begin(); i != doc["extraSprites"].end(); ++i)
446
 	for (YAML::const_iterator i = doc["extraSprites"].begin(); i != doc["extraSprites"].end(); ++i)
447
	{
447
	{
448
		std::string type = (*i)["type"].as<std::string>();
448
		std::string type = (*i)["type"].as<std::string>();
449
		std::auto_ptr<ExtraSprites> extraSprites(new ExtraSprites());
449
		std::unique_ptr<ExtraSprites> extraSprites(new ExtraSprites());
450
		extraSprites->load(*i, _modIndex);
450
		extraSprites->load(*i, _modIndex);
451
		_extraSprites.push_back(std::make_pair(type, extraSprites.release()));
451
		_extraSprites.push_back(std::make_pair(type, extraSprites.release()));
452
		_extraSpritesIndex.push_back(type);
452
		_extraSpritesIndex.push_back(type);
Lines 454-460 Link Here
454
 	for (YAML::const_iterator i = doc["extraSounds"].begin(); i != doc["extraSounds"].end(); ++i)
454
 	for (YAML::const_iterator i = doc["extraSounds"].begin(); i != doc["extraSounds"].end(); ++i)
455
	{
455
	{
456
		std::string type = (*i)["type"].as<std::string>();
456
		std::string type = (*i)["type"].as<std::string>();
457
		std::auto_ptr<ExtraSounds> extraSounds(new ExtraSounds());
457
		std::unique_ptr<ExtraSounds> extraSounds(new ExtraSounds());
458
		extraSounds->load(*i, _modIndex);
458
		extraSounds->load(*i, _modIndex);
459
		_extraSounds.push_back(std::make_pair(type, extraSounds.release()));
459
		_extraSounds.push_back(std::make_pair(type, extraSounds.release()));
460
		_extraSoundsIndex.push_back(type);
460
		_extraSoundsIndex.push_back(type);
Lines 468-474 Link Here
468
		}
468
		}
469
		else
469
		else
470
		{
470
		{
471
			std::auto_ptr<ExtraStrings> extraStrings(new ExtraStrings());
471
			std::unique_ptr<ExtraStrings> extraStrings(new ExtraStrings());
472
			extraStrings->load(*i);
472
			extraStrings->load(*i);
473
			_extraStrings[type] = extraStrings.release();
473
			_extraStrings[type] = extraStrings.release();
474
			_extraStringsIndex.push_back(type);
474
			_extraStringsIndex.push_back(type);
475
-- a/src/Savegame/AlienStrategy.cpp
475
++ b/src/Savegame/AlienStrategy.cpp
Lines 87-93 Link Here
87
	{
87
	{
88
		std::string region = (*nn)["region"].as<std::string>();
88
		std::string region = (*nn)["region"].as<std::string>();
89
		const YAML::Node &missions = (*nn)["missions"];
89
		const YAML::Node &missions = (*nn)["missions"];
90
		std::auto_ptr<WeightedOptions> options(new WeightedOptions());
90
		std::unique_ptr<WeightedOptions> options(new WeightedOptions());
91
		options->load(missions);
91
		options->load(missions);
92
		_regionMissions.insert(std::make_pair(region, options.release()));
92
		_regionMissions.insert(std::make_pair(region, options.release()));
93
	}
93
	}
94
-- a/src/Savegame/SavedGame.cpp
94
++ b/src/Savegame/SavedGame.cpp
Lines 371-377 Link Here
371
	{
371
	{
372
		std::string missionType = (*it)["type"].as<std::string>();
372
		std::string missionType = (*it)["type"].as<std::string>();
373
		const RuleAlienMission &mRule = *rule->getAlienMission(missionType);
373
		const RuleAlienMission &mRule = *rule->getAlienMission(missionType);
374
		std::auto_ptr<AlienMission> mission(new AlienMission(mRule));
374
		std::unique_ptr<AlienMission> mission(new AlienMission(mRule));
375
		mission->load(*it, *this);
375
		mission->load(*it, *this);
376
		_activeMissions.push_back(mission.release());
376
		_activeMissions.push_back(mission.release());
377
	}
377
	}

Return to bug 620270