diff --git a/converter/converter.cc b/converter/converter.cc index f065c2b..64643bb 100644 --- a/converter/converter.cc +++ b/converter/converter.cc @@ -62,7 +62,7 @@ Converter::Converter(){ Converter::~Converter(){ } -std::vector Converter::newComposition(int type, float posX, float posZ){ +std::vector Converter::newComposition(int type, float posX, float posZ){ XMLElement* newComposition = doc->NewElement("composition"); doc->InsertFirstChild(newComposition); @@ -102,7 +102,7 @@ std::vector Converter::newComposition(int type, float posX, float newComposition->InsertFirstChild(xRot); newComposition->InsertFirstChild(scale); - std::vector ret = nextID; + std::vector ret = nextID; nextID[1] += 1; if (nextID[1] == 255){ nextID[1] = 0; @@ -158,7 +158,7 @@ void Converter::save(){ doc->SaveFile(charXmlFile); } -std::vector Converter::getNextID(){ +std::vector Converter::getNextID(){ return nextID; } diff --git a/converter/converter.hh b/converter/converter.hh index 3e72b96..7b603f9 100644 --- a/converter/converter.hh +++ b/converter/converter.hh @@ -12,14 +12,14 @@ class Converter { Converter(); ~Converter(); void updateComposition(int idG, int idB, float posX, float posZ); //updates the position of a composition - std::vector newComposition(int type, float posX, float posZ);//creates a new composition and returns its ID + std::vector newComposition(int type, float posX, float posZ);//creates a new composition and returns its ID void deleteComposition(int idG, int idB); void save(); //writes the xml to file - std::vector getNextID(); //returns the next unused ID + std::vector getNextID(); //returns the next unused ID private: - std::vector nextID; + std::vector nextID; void errorCheck(XMLError error); std::string xmlFile; XMLDocument* doc = new XMLDocument(); diff --git a/converter/main.cc b/converter/main.cc index a18f867..81faafc 100644 --- a/converter/main.cc +++ b/converter/main.cc @@ -34,7 +34,7 @@ int main( int argc, char *argv[] ){ //if there is a composition here, adjust the xml and image if(image[pixel]!=0 && image[pixel]!=255){ if((image[pixel+1]==0 && image[pixel+2]==0) || (image[pixel+1]==255 && image[pixel+2]==255)){ - std::vector temp; + std::vector temp; temp = conv.newComposition(image[pixel], 0.5+rowNum-0.5*height, 0.5+columnNum-0.5*width); idFound[temp[0]][temp[1]] = true; image[pixel+1] = temp[0];