diff options
author | fluxgen <fluxgen> | 2002-08-11 22:28:18 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-08-11 22:28:18 (GMT) |
commit | 18174570f3ca1227eb19c18982daa3897e0d7636 (patch) | |
tree | d03839dcc32a103a400bb1392e1c88591a2adfe0 /src/Screen.cc | |
parent | c5e51485c6db0abe66578cacfe7c6e3d3f9c80a9 (diff) | |
download | fluxbox-18174570f3ca1227eb19c18982daa3897e0d7636.zip fluxbox-18174570f3ca1227eb19c18982daa3897e0d7636.tar.bz2 |
cleaning in getNameOfWorkspace
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 2441593..9ff9c8a 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.60 2002/08/04 15:48:13 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.61 2002/08/11 22:28:18 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -1081,14 +1081,13 @@ void BScreen::addWorkspaceName(const char *name) { | |||
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | 1083 | ||
1084 | void BScreen::getNameOfWorkspace(unsigned int workspace, char **name) { | 1084 | string BScreen::getNameOfWorkspace(unsigned int workspace) const { |
1085 | if (workspace < workspaceNames.size()) { | 1085 | if (workspace < workspaceNames.size()) { |
1086 | const char *wkspc_name = workspaceNames[workspace].c_str(); | 1086 | return workspaceNames[workspace]; |
1087 | } else { | ||
1088 | return ""; | ||
1089 | } | ||
1087 | 1090 | ||
1088 | if (wkspc_name) | ||
1089 | *name = StringUtil::strdup(wkspc_name); | ||
1090 | } else | ||
1091 | *name = 0; | ||
1092 | } | 1091 | } |
1093 | 1092 | ||
1094 | 1093 | ||