Permalink
Browse files

Cosmetic refactor (c++11 style c-trs, defaults, nullptrs)

  • Loading branch information...
klirichek committed Sep 11, 2018
1 parent 2d69039 commit 21bcc6d17395f0f57dde79f6716ef303b7ea527d
Showing with 63 additions and 95 deletions.
  1. +4 −7 src/searchd.cpp
  2. +1 −1 src/searchdaemon.h
  3. +4 −3 src/sphinx.h
  4. +53 −83 src/sphinxrt.cpp
  5. +1 −1 src/sphinxstd.cpp
@@ -17268,8 +17268,7 @@ static void HandleMysqlReloadIndex ( SqlRowBuffer_c & tOut, const SqlStmt_t & tS
//////////////////////////////////////////////////////////////////////////
CSphSessionAccum::CSphSessionAccum ( bool bManage )
: m_pAcc ( NULL )
, m_bManage ( bManage )
: m_bManage ( bManage )
{ }
CSphSessionAccum::~CSphSessionAccum()
@@ -17280,7 +17279,7 @@ CSphSessionAccum::~CSphSessionAccum()
ISphRtAccum * CSphSessionAccum::GetAcc ( ISphRtIndex * pIndex, CSphString & sError )
{
if ( !m_bManage )
return NULL;
return nullptr;
assert ( pIndex );
if ( m_pAcc )
@@ -17307,8 +17306,8 @@ class CSphinxqlSession : public ISphNoncopyable
CSphQueryResultMeta m_tLastMeta;
CSphSessionAccum m_tAcc;
PercolateMatchResult_t m_tPercolateMeta;
SqlStmt_e m_eLastStmt;
bool m_bFederatedUser;
SqlStmt_e m_eLastStmt { STMT_DUMMY };
bool m_bFederatedUser = false;
CSphString m_sFederatedQuery;
public:
@@ -17319,8 +17318,6 @@ class CSphinxqlSession : public ISphNoncopyable
public:
explicit CSphinxqlSession ( bool bManage )
: m_tAcc ( bManage )
, m_eLastStmt ( STMT_DUMMY )
, m_bFederatedUser ( false )
{}
// just execute one sphinxql statement
@@ -1139,7 +1139,7 @@ class CSphSessionAccum
ISphRtIndex * GetIndex ();
private:
ISphRtAccum * m_pAcc;
ISphRtAccum * m_pAcc = nullptr;
bool m_bManage;
};
@@ -82,6 +82,7 @@ typedef uint64_t SphWordID_t;
typedef uint64_t SphDocID_t;
#define DOCID_MAX U64C(0xffffffffffffffff)
#define WORDID_MAX U64C(0xffffffffffffffff)
#define DOCID_FMT UINT64_FMT
#define DOCINFO_IDSIZE 2
@@ -1106,9 +1107,9 @@ struct FieldMask_t
/// hit info
struct CSphWordHit
{
SphDocID_t m_uDocID; ///< document ID
SphWordID_t m_uWordID; ///< word ID in current dictionary
Hitpos_t m_uWordPos; ///< word position in current document
SphDocID_t m_uDocID = DOCID_MAX; ///< document ID
SphWordID_t m_uWordID = WORDID_MAX; ///< word ID in current dictionary
Hitpos_t m_uWordPos = EMPTY_HIT; ///< word position in current document
};
Oops, something went wrong.

0 comments on commit 21bcc6d

Please sign in to comment.