xapian-core  2.0.0
Macros | Functions
sortable-serialise.cc File Reference

Serialise floating point values to strings which sort the same way. More...

#include <config.h>
#include <xapian/queryparser.h>
#include "negate_unsigned.h"
#include <cfloat>
#include <cmath>
#include <cstring>
#include <string>
#include <string_view>
+ Include dependency graph for sortable-serialise.cc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UNITTEST_ASSERT_NOTHROW(COND, RET)
 

Functions

static unsigned char numfromstr (std::string_view str, std::string::size_type pos)
 Get a number from the character at a given position in a string, returning 0 if the string isn't long enough. More...
 

Detailed Description

Serialise floating point values to strings which sort the same way.

Definition in file sortable-serialise.cc.

Macro Definition Documentation

◆ UNITTEST_ASSERT_NOTHROW

#define UNITTEST_ASSERT_NOTHROW (   COND,
  RET 
)

Definition at line 30 of file sortable-serialise.cc.

Function Documentation

◆ numfromstr()

static unsigned char numfromstr ( std::string_view  str,
std::string::size_type  pos 
)
inlinestatic

Get a number from the character at a given position in a string, returning 0 if the string isn't long enough.

Definition at line 180 of file sortable-serialise.cc.

References pos, and Xapian::Internal::str().

Referenced by Xapian::sortable_unserialise().