Clean trailing spaces

master
rubenwardy 2015-02-02 18:40:35 +00:00
parent 81889d591f
commit c6a937629c
23 changed files with 19 additions and 39 deletions

View File

@ -86,4 +86,3 @@ int Configuration::getInt(const std::string & key) const
{
return atoi(settings.find(key)->second.c_str());
}

View File

@ -8,7 +8,7 @@ class Configuration
public:
Configuration() {}
bool load(const std::string & filename);
bool save(const std::string & filename);
bool save(const std::string & filename);
// Getters
const std::string & get(const std::string & key) const;

View File

@ -540,4 +540,3 @@ void Editor::viewportTick(Viewport viewport, rect<s32> rect, bool mousehit)
}
}
}

View File

@ -83,4 +83,3 @@ ViewportType EditorState::getViewportType(Viewport id)
return stringToType(settings->get("viewport_bottom_right"), VIEWT_PERS);
}
}

View File

@ -42,8 +42,8 @@ public:
}
void SelectMode(int id);
void AddMode(EditorMode *value);
void AddMode(EditorMode *value);
void CloseEditor() { close_requested = true; }
bool NeedsClose() const { return close_requested; }
@ -51,7 +51,7 @@ public:
bool mousedown;
vector2di mouse_position;
KeyState keys[NUMBER_OF_KEYS];
Configuration *settings;
MenuState *menu;

View File

@ -10,7 +10,7 @@
bool CPPFileFormat::write(Project * project, const std::string & filename){
std::ofstream file(filename.c_str());
if (!file) {
if (!file) {
error_code = EFFE_IO_ERROR;
return false;
}
@ -39,7 +39,7 @@ bool CPPFileFormat::write(Project * project, const std::string & filename){
for (std::vector<NodeBox*>::const_iterator it = boxes.begin();
it != boxes.end();
++it) {
file << "\t// " << (*it)->name << "\n";
if (is_first) {
file << "\tf->setNodeBox(core::aabbox3d<f32>(\n";
@ -65,4 +65,3 @@ Project * CPPFileFormat::read(const std::string & file, Project *project)
throw std::runtime_error("CPPFileFormat::read() is not implemented!");
return NULL;
}

View File

@ -43,7 +43,7 @@ std::string doTileImage(Node *node, CubeSide face)
Media::Image *image = node->getTexture(face);
if (!image)
return "default_wood.png";
return image->name;
}
@ -105,4 +105,3 @@ Project * LuaFileFormat::read(const std::string & file, Project *project)
throw std::runtime_error("LuaFileFormat::read() is not implemented!");
return NULL;
}

View File

@ -21,7 +21,7 @@ public:
{
READ_STAGE_ROOT,
READ_STAGE_NODE
};
};
private:
readstage stage;
Node *node;
@ -33,4 +33,3 @@ private:
};
#endif

View File

@ -44,4 +44,3 @@ void addXYZ(IGUIElement* parent,IGUIEnvironment* guienv, vector2di pos, int star
addBox(parent, guienv, vector2di(pos.X, pos.Y + 30), startIndex + 1, L"Y"); // 80, 0
addBox(parent, guienv, vector2di(pos.X, pos.Y + 60), startIndex + 2, L"Z"); // 160, 0
}

View File

@ -134,5 +134,3 @@ void Node::rotate(EAxis axis) {
}
remesh();
}

View File

@ -431,4 +431,3 @@ void NodeBox::rotate(EAxis axis)
two.Z = tmp;
}
}

View File

@ -41,7 +41,7 @@ void Project::hideAllButCurrentNode()
it != nodes.end();
++it, ++curid) {
if (snode == curid) {
(*it)->remesh();
(*it)->remesh();
} else {
(*it)->hide();
}
@ -120,4 +120,3 @@ Node* Project::GetCurrentNode() const
return NULL;
}
}

View File

@ -32,7 +32,7 @@ public:
void hideAllButCurrentNode();
void remesh();
Node* GetNode(int id) const;
Node* GetNode(vector3di pos) const;
Node* GetNode(vector3di pos) const;
Node* GetCurrentNode() const;
int GetSelectedNodeId() const { return snode; }
unsigned int GetNodeCount() const { return _node_count; }

View File

@ -21,4 +21,3 @@ private:
};
#endif

View File

@ -82,7 +82,7 @@ int main(int argc, char *argv[]) {
if (!editor_is_installed)
conf->load("editor.conf");
else
if (!conf->load(std::string(getSaveLoadDirectory("", true)) + ".config/nodeboxeditor.conf"))
if (!conf->load(std::string(getSaveLoadDirectory("", true)) + ".config/nodeboxeditor.conf"))
conf->load("editor.conf");
conf->set("installed", editor_is_installed?"true":"false");
@ -118,7 +118,7 @@ int main(int argc, char *argv[]) {
if (device == NULL) {
return EXIT_FAILURE; // could not create selected driver.
}
#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8
std::cerr << "Warning! Your irrlicht version is outdated, so some NBE features will not be available." << std::endl;
#endif
@ -130,7 +130,7 @@ int main(int argc, char *argv[]) {
if (!editor_is_installed)
conf->save("editor.conf");
else
if (!conf->save(std::string(getSaveLoadDirectory("", true)) + ".config/nodeboxeditor.conf"))
if (!conf->save(std::string(getSaveLoadDirectory("", true)) + ".config/nodeboxeditor.conf"))
conf->save("editor.conf");
return 1;
@ -144,4 +144,3 @@ void junk() {
i = pthread_getconcurrency();
};
#endif

View File

@ -546,5 +546,3 @@ irr::video::ITexture* NBEditor::icon()
->getTexture("media/icon_mode_nodebox.png");
return icon;
}

View File

@ -48,4 +48,3 @@ private:
};
#endif

View File

@ -241,4 +241,3 @@ irr::video::ITexture* NodeEditor::icon()
getVideoDriver()->getTexture("media/icon_mode_node.png");
return icon;
}

View File

@ -115,4 +115,3 @@ irr::video::ITexture* TextureEditor::icon()
getVideoDriver()->getTexture("media/icon_mode_texture.png");
return icon;
}

View File

@ -26,7 +26,7 @@ bool SimpleFileCombiner::write(std::string filename) {
std::ofstream output(filename.c_str(), std::ios::binary|std::ios::out);
if (!output) {
errcode = EERR_IO;
return false;
return false;
}
output.write("NBEFP", 5);
output << (char)files.size();
@ -42,17 +42,17 @@ bool SimpleFileCombiner::write(std::string filename) {
name += " ";
}
output << name.c_str();
output.write(static_cast<char*>(static_cast<void*>(&start)), sizeof(unsigned int));
output.write(static_cast<char*>(static_cast<void*>(&start)), sizeof(unsigned int));
output.write(static_cast<char*>(static_cast<void*>(&size)), sizeof(unsigned int));
start += size;
}
}
for (std::list<SimpleFileCombiner::File>::const_iterator it = files.begin();
it != files.end();
++it) {
SimpleFileCombiner::File file = *it;
output.write(&file.bytes[0], file.bytes.size());
}
}
output.close();
return true;
}

View File

@ -39,4 +39,3 @@ public:
};
#endif

View File

@ -33,4 +33,3 @@ std::string str_replace(const std::string & str, char f, char r)
std::replace(s.begin(), s.end(), f, r);
return s;
}

View File

@ -30,7 +30,7 @@ On UNIX it tries successive command line calls:
- python 2 / tkinter
- dialog.
The same executable can run across desktops and distributions.
- License -
This software is provided 'as-is', without any express or implied