Skip to content

Instantly share code, notes, and snippets.

@dcolish
Created August 21, 2012 00:06
Show Gist options
  • Select an option

  • Save dcolish/3409537 to your computer and use it in GitHub Desktop.

Select an option

Save dcolish/3409537 to your computer and use it in GitHub Desktop.
diff --git a/xapian-core/queryparser/linkgrammar.cc b/xapian-core/queryparser/linkgrammar.cc
index 37518a9..dbcafb7 100755
--- a/xapian-core/queryparser/linkgrammar.cc
+++ b/xapian-core/queryparser/linkgrammar.cc
@@ -32,10 +32,9 @@ using namespace Xapian;
using namespace std;
-LinkGrammar::LinkGrammar(const string & language, const int seconds)
+LinkGrammar::LinkGrammar(const string & language, const int seconds) :
+ internal(new LinkGrammar::Internal), Language(language), Time(seconds)
{
- Language = language;
- Time = seconds;
}
LinkGrammar::~LinkGrammar()
diff --git a/xapian-core/queryparser/linkgrammar_internal.h b/xapian-core/queryparser/linkgrammar_internal.h
index 8ed8539..7bdd4be 100644
--- a/xapian-core/queryparser/linkgrammar_internal.h
+++ b/xapian-core/queryparser/linkgrammar_internal.h
@@ -46,6 +46,8 @@ class LinkGrammar::Internal : public Xapian::Internal::intrusive_base {
/// Destructor.
~Internal();
+ Internal() : internal_Dict(), internal_Opts() {};
+
#ifdef HAVE_LIBLINK_GRAMMAR
void initialize (const std::string & language, const int seconds);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment