Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forward declare in RevTooltip.h and move includes to .cpp

  • Loading branch information...
commit a4e974c633a58aeba3490ce206f105b5250aead4 1 parent d2bcd6a
@adamv adamv authored
Showing with 12 additions and 8 deletions.
  1. +7 −3 src/RevTooltip.cpp
  2. +5 −5 src/RevTooltip.h
View
10 src/RevTooltip.cpp
@@ -13,9 +13,13 @@
#include "RevTooltip.h"
#include <wx/statline.h>
+#include "Catalyst.h"
-RevTooltip::RevTooltip(wxWindow *parent, const CatalystWrapper catalyst)
-: m_catalyst(catalyst)
+RevTooltip::RevTooltip(const CatalystWrapper& catalyst):
+ m_catalyst(catalyst) {}
+
+RevTooltip::RevTooltip(wxWindow *parent, const CatalystWrapper& catalyst):
+ m_catalyst(catalyst)
{
Create(parent);
}
@@ -94,7 +98,7 @@ void RevTooltip::SetDocument(const doc_id& di, wxPoint pos) {
cxLOCK_READ(m_catalyst)
wxASSERT(catalyst.IsOk(di));
- m_docId = di;
+ doc_id m_docId = di;
// Set the user info
const unsigned int userId = catalyst.GetDocAuthor(m_docId);
View
10 src/RevTooltip.h
@@ -21,12 +21,13 @@
#include "wx/popupwin.h"
-#include "Catalyst.h"
+class CatalystWrapper;
+class doc_id;
class RevTooltip : public wxPopupWindow {
public:
- RevTooltip(const CatalystWrapper catalyst) : m_catalyst(catalyst) {};
- RevTooltip(wxWindow *parent, const CatalystWrapper catalyst);
+ RevTooltip(const CatalystWrapper& catalyst);
+ RevTooltip(wxWindow *parent, const CatalystWrapper& catalyst);
void Create(wxWindow *parent);
void SetDocument(const doc_id& di, wxPoint pos);
@@ -37,8 +38,7 @@ class RevTooltip : public wxPopupWindow {
ColorBox(wxWindow* parent, wxWindowID id);
};
- const CatalystWrapper m_catalyst;
- doc_id m_docId;
+ const CatalystWrapper& m_catalyst;
wxPanel* m_mainPanel;
wxBoxSizer* m_mainSizer;
Please sign in to comment.
Something went wrong with that request. Please try again.