mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-02-16 11:35:49 +00:00
Use new custom lexical_cast instead of the one from boost.
This commit is contained in:
parent
f9387114bf
commit
691bdd1d1e
2 changed files with 12 additions and 12 deletions
|
@ -19,11 +19,11 @@
|
|||
#include "dindexer-machinery/recorddata.hpp"
|
||||
#include "backends/exposed_functions.hpp"
|
||||
#include "backends/backend_version.hpp"
|
||||
#include "helpers/lexical_cast.hpp"
|
||||
#include "dindexerConfig.h"
|
||||
#include "helpers/stringize.h"
|
||||
#include <utility>
|
||||
#include <yaml-cpp/yaml.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace dindb {
|
|||
};
|
||||
|
||||
std::pair<std::string, mchlib::FileRecordData> pair_list_to_file_record (const redis::Command::hscan_range& parRange, const mchlib::TigerHash& parHash) {
|
||||
using boost::lexical_cast;
|
||||
using dinhelp::lexical_cast;
|
||||
|
||||
mchlib::FileRecordData retval;
|
||||
retval.hash = parHash;
|
||||
|
@ -77,7 +77,7 @@ namespace dindb {
|
|||
}
|
||||
|
||||
mchlib::SetRecordDataFull pair_list_to_set_record (const redis::Command::hscan_range& parRange) {
|
||||
using boost::lexical_cast;
|
||||
using dinhelp::lexical_cast;
|
||||
|
||||
mchlib::SetRecordDataFull retval;
|
||||
for (const auto& itm : parRange) {
|
||||
|
@ -88,9 +88,9 @@ namespace dindb {
|
|||
else if (itm.first == "fs_uuid")
|
||||
retval.fs_uuid = itm.second;
|
||||
else if (itm.first == "type")
|
||||
retval.type = lexical_cast<char>(itm.second[0]);
|
||||
retval.type = itm.second[0];
|
||||
else if (itm.first == "content_type")
|
||||
retval.content_type = lexical_cast<char>(itm.second[0]);
|
||||
retval.content_type = itm.second[0];
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ namespace dindb {
|
|||
}
|
||||
|
||||
void BackendRedis::connect() {
|
||||
using boost::lexical_cast;
|
||||
using dinhelp::lexical_cast;
|
||||
|
||||
m_redis.connect();
|
||||
if (m_redis.is_connected() and m_database > 0) {
|
||||
|
@ -172,7 +172,7 @@ namespace dindb {
|
|||
}
|
||||
|
||||
void BackendRedis::write_files (const std::vector<mchlib::FileRecordData>& parData, const mchlib::SetRecordDataFull& parSetData, const std::string& parSignature) {
|
||||
using boost::lexical_cast;
|
||||
using dinhelp::lexical_cast;
|
||||
using boost::string_ref;
|
||||
|
||||
redis::Reply set_id_reply = m_redis.run("HINCRBY", PROGRAM_NAME ":indices", "set", "1");
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
*/
|
||||
|
||||
#include "scan_iterator.hpp"
|
||||
#include "helpers/lexical_cast.hpp"
|
||||
#include "command.hpp"
|
||||
#include <cassert>
|
||||
#include <ciso646>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace redis {
|
||||
|
@ -42,8 +42,8 @@ namespace redis {
|
|||
}
|
||||
|
||||
Reply ScanIteratorBaseClass::run (const char* parCommand, long long parScanContext, std::size_t parCount) {
|
||||
const auto scan_context = boost::lexical_cast<std::string>(parScanContext);
|
||||
const auto count_hint = boost::lexical_cast<std::string>(parCount);
|
||||
const auto scan_context = dinhelp::lexical_cast<std::string>(parScanContext);
|
||||
const auto count_hint = dinhelp::lexical_cast<std::string>(parCount);
|
||||
if (m_match_pattern.empty())
|
||||
return m_command->run(parCommand, scan_context, "COUNT", count_hint);
|
||||
else
|
||||
|
@ -51,8 +51,8 @@ namespace redis {
|
|||
}
|
||||
|
||||
Reply ScanIteratorBaseClass::run (const char* parCommand, const boost::string_ref& parParameter, long long parScanContext, std::size_t parCount) {
|
||||
const auto scan_context = boost::lexical_cast<std::string>(parScanContext);
|
||||
const auto count_hint = boost::lexical_cast<std::string>(parCount);
|
||||
const auto scan_context = dinhelp::lexical_cast<std::string>(parScanContext);
|
||||
const auto count_hint = dinhelp::lexical_cast<std::string>(parCount);
|
||||
if (m_match_pattern.empty())
|
||||
return m_command->run(parCommand, parParameter, scan_context, "COUNT", count_hint);
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue