rayzor

diff src/scene.cc @ 1:a826bf0fb169

fixed line endings
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Apr 2014 09:05:26 +0300
parents 2a5340a6eee4
children 5fcf72837b69
line diff
     1.1 --- a/src/scene.cc	Sat Apr 05 08:46:27 2014 +0300
     1.2 +++ b/src/scene.cc	Sat Apr 05 09:05:26 2014 +0300
     1.3 @@ -1,43 +1,43 @@
     1.4 -#include "scene.h"
     1.5 -
     1.6 -Scene::Scene()
     1.7 -{
     1.8 -	name = 0;
     1.9 -}
    1.10 -
    1.11 -Scene::~Scene()
    1.12 -{
    1.13 -	clear();
    1.14 -}
    1.15 -
    1.16 -void Scene::clear()
    1.17 -{
    1.18 -	delete [] name;
    1.19 -
    1.20 -	size_t i;
    1.21 -	for(i=0; i<objects.size(); i++) {
    1.22 -		delete objects[i];
    1.23 -	}
    1.24 -	for(i=0; i<lights.size(); i++) {
    1.25 -		delete lights[i];
    1.26 -	}
    1.27 -	for(i=0; i<cameras.size(); i++) {
    1.28 -		delete cameras[i];
    1.29 -	}
    1.30 -}
    1.31 -
    1.32 -void Scene::set_name(const char *name)
    1.33 -{
    1.34 -	delete [] this->name;
    1.35 -	this->name = new char[strlen(name) + 1];
    1.36 -	strcpy(this->name, name);
    1.37 -}
    1.38 -
    1.39 -const char *Scene::get_name() const
    1.40 -{
    1.41 -	return name ? name : "<unknown>";
    1.42 -}
    1.43 -
    1.44 -void Scene::draw() const
    1.45 -{
    1.46 -}
    1.47 +#include "scene.h"
    1.48 +
    1.49 +Scene::Scene()
    1.50 +{
    1.51 +	name = 0;
    1.52 +}
    1.53 +
    1.54 +Scene::~Scene()
    1.55 +{
    1.56 +	clear();
    1.57 +}
    1.58 +
    1.59 +void Scene::clear()
    1.60 +{
    1.61 +	delete [] name;
    1.62 +
    1.63 +	size_t i;
    1.64 +	for(i=0; i<objects.size(); i++) {
    1.65 +		delete objects[i];
    1.66 +	}
    1.67 +	for(i=0; i<lights.size(); i++) {
    1.68 +		delete lights[i];
    1.69 +	}
    1.70 +	for(i=0; i<cameras.size(); i++) {
    1.71 +		delete cameras[i];
    1.72 +	}
    1.73 +}
    1.74 +
    1.75 +void Scene::set_name(const char *name)
    1.76 +{
    1.77 +	delete [] this->name;
    1.78 +	this->name = new char[strlen(name) + 1];
    1.79 +	strcpy(this->name, name);
    1.80 +}
    1.81 +
    1.82 +const char *Scene::get_name() const
    1.83 +{
    1.84 +	return name ? name : "<unknown>";
    1.85 +}
    1.86 +
    1.87 +void Scene::draw() const
    1.88 +{
    1.89 +}