Navigation Menu

Skip to content

Commit

Permalink
Fixes github#88 (loose of query string). Added a testcase.
Browse files Browse the repository at this point in the history
Note that test case is NOT cover our code, but may say if your compiler is quite nasty.
  • Loading branch information
klirichek committed Jun 28, 2018
1 parent 85eefd1 commit 6885626
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/gtests_functions.cpp
Expand Up @@ -1195,5 +1195,14 @@ TEST ( functions, sphSplit )
ASSERT_STREQ ( dParts[1].cstr (), "a" );
}

// as we found g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) works strange with curly initializer of refs
TEST ( functions, curledref )
{
CSphString sProof="abc";
const CSphString &sTest { sProof };
const CSphString &sTestc ( sProof );
ASSERT_TRUE ( &sProof==&sTestc ) << "curly brackets";
ASSERT_TRUE ( &sProof==&sTest ) << "figured brackets";
}


2 changes: 1 addition & 1 deletion src/searchdhttp.cpp
Expand Up @@ -690,7 +690,7 @@ class HttpHandler_c
{
public:
HttpHandler_c ( const CSphString & sQuery, int iCID, bool bNeedHttpResponse )
: m_sQuery { sQuery }
: m_sQuery ( sQuery )
, m_iCID ( iCID )
, m_bNeedHttpResponse ( bNeedHttpResponse )
{}
Expand Down

0 comments on commit 6885626

Please sign in to comment.