freebsd-ports/textproc/sphinxsearch/files/patch-src_searchd.cpp
Matthew Seaman f074c54f02 Patches to make the code compatible with clang-6.0 / C++17 -- this will
fix the build on FreeBSD 12.0

   - delete the 'register' keyword everywhere
   - Add whitespace between adjacent quoted strings
   - Update the offsetof() macro to cast the result to int

Reported by:	pkg-fallout
2018-02-04 09:16:23 +00:00

24 lines
840 B
C++

--- src/searchd.cpp.orig 2018-02-03 10:33:59 UTC
+++ src/searchd.cpp
@@ -8580,16 +8580,16 @@ struct GenericMatchSort_fn : public CSphMatchComparato
case SPH_KEYPART_INT:
{
- register SphAttr_t aa = a->GetAttr ( m_tLocator[i] );
- register SphAttr_t bb = b->GetAttr ( m_tLocator[i] );
+ SphAttr_t aa = a->GetAttr ( m_tLocator[i] );
+ SphAttr_t bb = b->GetAttr ( m_tLocator[i] );
if ( aa==bb )
continue;
return ( ( m_uAttrDesc>>i ) & 1 ) ^ ( aa < bb );
}
case SPH_KEYPART_FLOAT:
{
- register float aa = a->GetAttrFloat ( m_tLocator[i] );
- register float bb = b->GetAttrFloat ( m_tLocator[i] );
+ float aa = a->GetAttrFloat ( m_tLocator[i] );
+ float bb = b->GetAttrFloat ( m_tLocator[i] );
if ( aa==bb )
continue;
return ( ( m_uAttrDesc>>i ) & 1 ) ^ ( aa < bb );