Browse Source

inline function bodies belong in .I file

David Rose 23 years ago
parent
commit
d69559a639

+ 3 - 3
panda/src/putil/Sources.pp

@@ -35,7 +35,7 @@
     ioPtaDatagramShort.h keyboardButton.h lineStream.I \
     lineStream.h lineStreamBuf.I lineStreamBuf.h \
     modifierButtons.I modifierButtons.h mouseButton.h \
-    mouseData.h nameUniquifier.I nameUniquifier.h \
+    mouseData.I mouseData.h nameUniquifier.I nameUniquifier.h \
     ordered_vector.h ordered_vector.I ordered_vector.T \
     pipeline.h pipeline.I \
     pipelineCycler.h pipelineCycler.I \
@@ -104,8 +104,8 @@
     ioPtaDatagramFloat.h ioPtaDatagramInt.h \
     ioPtaDatagramShort.h iterator_types.h keyboardButton.h lineStream.I \
     lineStream.h lineStreamBuf.I lineStreamBuf.h modifierButtons.I \
-    modifierButtons.h mouseButton.h mouseData.h nameUniquifier.I \
-    nameUniquifier.h \
+    modifierButtons.h mouseButton.h mouseData.I mouseData.h \
+    nameUniquifier.I nameUniquifier.h \
     ordered_vector.h ordered_vector.I ordered_vector.T \
     pipeline.h pipeline.I \
     pipelineCycler.h pipelineCycler.I \

+ 48 - 0
panda/src/putil/mouseData.I

@@ -0,0 +1,48 @@
+// Filename: mouseData.I
+// Created by:  drose (15Jul02)
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////
+//     Function: MouseData::get_x
+//       Access: Published
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE int MouseData::
+get_x() const {
+  return _xpos;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: MouseData::get_y
+//       Access: Published
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE int MouseData::
+get_y() const {
+  return _ypos;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: MouseData::get_in_window
+//       Access: Published
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE bool MouseData::
+get_in_window() const {
+  return _in_window;
+}

+ 1 - 1
panda/src/putil/mouseData.cxx

@@ -20,7 +20,7 @@
 
 ////////////////////////////////////////////////////////////////////
 //     Function: MouseData::Constructor
-//       Access: Public
+//       Access: Published
 //  Description:
 ////////////////////////////////////////////////////////////////////
 MouseData::

+ 6 - 4
panda/src/putil/mouseData.h

@@ -19,7 +19,7 @@
 #ifndef MOUSEDATA_H
 #define MOUSEDATA_H
 
-#include <pandabase.h>
+#include "pandabase.h"
 
 #include "modifierButtons.h"
 
@@ -33,9 +33,9 @@ class EXPCL_PANDA MouseData {
 PUBLISHED:
   MouseData();
 
-  INLINE int get_x() const {return _xpos;};
-  INLINE int get_y() const {return _ypos;};
-  INLINE bool get_in_window() const {return _in_window;};
+  INLINE int get_x() const;
+  INLINE int get_y() const;
+  INLINE bool get_in_window() const;
 
 public:
   bool _in_window;
@@ -43,6 +43,8 @@ public:
   int _ypos;
 };
 
+#include "mouseData.I"
+
 #endif