aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/KeyUtil.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-10-13 19:31:56 (GMT)
committerfluxgen <fluxgen>2003-10-13 19:31:56 (GMT)
commit45905b9b773c9a43a765373ef11f451dc5dcd94a (patch)
tree6cdebdb47733009e25dd5a7ad7a62a3af752b912 /src/FbTk/KeyUtil.cc
parentea61aa6480fa1ebc9bd8be330fe9d6ee70a963eb (diff)
downloadfluxbox-45905b9b773c9a43a765373ef11f451dc5dcd94a.zip
fluxbox-45905b9b773c9a43a765373ef11f451dc5dcd94a.tar.bz2
using auto_ptr
Diffstat (limited to 'src/FbTk/KeyUtil.cc')
-rw-r--r--src/FbTk/KeyUtil.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc
index 71dc22a..72e78eb 100644
--- a/src/FbTk/KeyUtil.cc
+++ b/src/FbTk/KeyUtil.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: KeyUtil.cc,v 1.3 2003/10/05 07:20:16 rathnor Exp $ 22// $Id: KeyUtil.cc,v 1.4 2003/10/13 19:31:56 fluxgen Exp $
23 23
24#include "KeyUtil.hh" 24#include "KeyUtil.hh"
25#include "App.hh" 25#include "App.hh"
@@ -28,12 +28,12 @@
28 28
29namespace FbTk { 29namespace FbTk {
30 30
31KeyUtil *KeyUtil::s_keyutil = 0; 31std::auto_ptr<KeyUtil> KeyUtil::s_keyutil;
32 32
33KeyUtil *KeyUtil::instance() { 33KeyUtil &KeyUtil::instance() {
34 if (s_keyutil == 0) 34 if (s_keyutil.get() == 0)
35 s_keyutil = new KeyUtil(); 35 s_keyutil.reset(new KeyUtil());
36 return s_keyutil; 36 return *s_keyutil.get();
37} 37}
38 38
39 39
@@ -170,7 +170,7 @@ void KeyUtil::ungrabKeys() {
170} 170}
171 171
172unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) { 172unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) {
173 XModifierKeymap *modmap = instance()->m_modmap; 173 XModifierKeymap *modmap = instance().m_modmap;
174 174
175 if (!modmap) return 0; 175 if (!modmap) return 0;
176 176