diff options
author | David Robillard <d@drobilla.net> | 2009-05-13 16:04:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-13 16:04:14 +0000 |
commit | b84b50d2bbbfcd196d62344eaeef7fb08e3d686c (patch) | |
tree | 5b65cb8ec437087f1352ac23730355d6cc6369cb /src/StateManager.cpp | |
parent | ddc09de45b45bdf2afdeff68eb8a17ad237ef6c3 (diff) | |
download | patchage-b84b50d2bbbfcd196d62344eaeef7fb08e3d686c.tar.gz patchage-b84b50d2bbbfcd196d62344eaeef7fb08e3d686c.tar.bz2 patchage-b84b50d2bbbfcd196d62344eaeef7fb08e3d686c.zip |
Strip trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@1999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/StateManager.cpp')
-rw-r--r-- | src/StateManager.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/StateManager.cpp b/src/StateManager.cpp index f5dcc94..0b8c55c 100644 --- a/src/StateManager.cpp +++ b/src/StateManager.cpp @@ -1,15 +1,15 @@ /* This file is part of Patchage. * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * + * * Patchage is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA @@ -34,14 +34,14 @@ StateManager::StateManager() bool -StateManager::get_module_location(const string& name, ModuleType type, Coord& loc) +StateManager::get_module_location(const string& name, ModuleType type, Coord& loc) { map<string, ModuleSettings>::const_iterator i = _module_settings.find(name); if (i == _module_settings.end()) return false; const ModuleSettings& settings = (*i).second; - + switch (type) { case Input: if (settings.input_location) { @@ -70,7 +70,7 @@ StateManager::get_module_location(const string& name, ModuleType type, Coord& lo void -StateManager::set_module_location(const string& name, ModuleType type, Coord loc) +StateManager::set_module_location(const string& name, ModuleType type, Coord loc) { retry: map<string, ModuleSettings>::iterator i = _module_settings.find(name); @@ -115,19 +115,19 @@ StateManager::get_module_split(const string& name, bool default_val) const void -StateManager::set_module_split(const string& name, bool split) +StateManager::set_module_split(const string& name, bool split) { _module_settings[name].split = split; } void -StateManager::load(const string& filename) -{ +StateManager::load(const string& filename) +{ _module_settings.clear(); cerr << "Loading configuration file " << filename << endl; - + std::ifstream is; is.open(filename.c_str(), std::ios::in); @@ -145,7 +145,7 @@ StateManager::load(const string& filename) is >> s; _window_location.y = atoi(s.c_str()); } - + is >> s; if (s == "window_size") { is >> s; @@ -160,7 +160,7 @@ StateManager::load(const string& filename) msg.append(s).append("\""); throw std::runtime_error(msg); } - + is >> s; _zoom = atof(s.c_str()); @@ -171,7 +171,7 @@ StateManager::load(const string& filename) while (1) { is >> s; if (is.eof()) break; - + // Old versions didn't quote, so need to support both :/ if (s[0] == '\"') { if (s.length() > 1 && s[s.length()-1] == '\"') { @@ -217,7 +217,7 @@ write_module_settings_entry( } void -StateManager::save(const string& filename) +StateManager::save(const string& filename) { std::ofstream os; os.open(filename.c_str(), std::ios::out); @@ -249,14 +249,14 @@ StateManager::save(const string& filename) float -StateManager::get_zoom() +StateManager::get_zoom() { return _zoom; } void -StateManager::set_zoom(float zoom) +StateManager::set_zoom(float zoom) { _zoom = zoom; } @@ -266,7 +266,7 @@ int StateManager::get_port_color(PortType type) { // Darkest tango palette colour, with S -= 6, V -= 6, w/ transparency - + if (type == JACK_AUDIO) return 0x244678C0; else if (type == JACK_MIDI) |