From eaf8c0778d4e0e53f95568a861dce984d5d24757 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Wed, 7 Jun 2017 00:18:52 +0100 Subject: [PATCH] Replace string_ref with string_view in test. --- test/simulation/fake_storage.cpp | 6 +++--- test/simulation/fake_storage.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/simulation/fake_storage.cpp b/test/simulation/fake_storage.cpp index bcb43b4..bd1a4da 100644 --- a/test/simulation/fake_storage.cpp +++ b/test/simulation/fake_storage.cpp @@ -41,9 +41,9 @@ namespace tawashi { } Storage::SubmissionResult FakeStorage::submit_pastie ( - const boost::string_ref& parText, + const boost::string_view& parText, uint32_t parExpiry, - const boost::string_ref& parLang, + const boost::string_view& parLang, const std::string& parRemoteIP ) const { SubmittedPastie pastie; @@ -60,7 +60,7 @@ namespace tawashi { return submission_res; } - boost::optional FakeStorage::retrieve_pastie (const boost::string_ref& parToken) const { + boost::optional FakeStorage::retrieve_pastie (const boost::string_view& parToken) const { auto it_found = std::find_if( m_submitted_pasties.begin(), m_submitted_pasties.end(), diff --git a/test/simulation/fake_storage.hpp b/test/simulation/fake_storage.hpp index 214eefa..2cf2c79 100644 --- a/test/simulation/fake_storage.hpp +++ b/test/simulation/fake_storage.hpp @@ -44,13 +44,13 @@ namespace tawashi { tawashi_virtual_testing bool is_connected() const; tawashi_virtual_testing void finalize_connection(); tawashi_virtual_testing SubmissionResult submit_pastie ( - const boost::string_ref& parText, + const boost::string_view& parText, uint32_t parExpiry, - const boost::string_ref& parLang, + const boost::string_view& parLang, const std::string& parRemoteIP ) const; - tawashi_virtual_testing boost::optional retrieve_pastie (const boost::string_ref& parToken) const; + tawashi_virtual_testing boost::optional retrieve_pastie (const boost::string_view& parToken) const; const std::vector& submitted_pasties() const;