Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: net/quic/platform/impl/quic_str_cat_impl.h

Issue 2850573002: Landing Recent QUIC changes until 3:35 PM, Apr 26, 2017 UTC-4 (Closed)
Patch Set: Remove Disconnect from ~QuicTestClient Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/platform/impl/quic_ptr_util_impl.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_ 5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
6 #define NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_ 6 #define NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 10
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 template <typename... Args> 15 template <typename... Args>
16 inline std::string QuicStrCatImpl(const Args&... args) { 16 inline std::string QuicStrCatImpl(const Args&... args) {
17 std::ostringstream oss; 17 std::ostringstream oss;
18 int dummy[] = {1, (oss << args, 0)...}; 18 int dummy[] = {1, (oss << args, 0)...};
19 static_cast<void>(dummy); 19 static_cast<void>(dummy);
20 return oss.str(); 20 return oss.str();
21 } 21 }
22 22
23 template <typename... Args> 23 template <typename... Args>
24 inline std::string QuicStringPrintfImpl(const Args&... args) { 24 inline std::string QuicStringPrintfImpl(const Args&... args) {
25 return std::move(base::StringPrintf(std::forward<const Args&>(args)...)); 25 return base::StringPrintf(std::forward<const Args&>(args)...);
26 } 26 }
27 27
28 } // namespace net 28 } // namespace net
29 29
30 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_ 30 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
OLDNEW
« no previous file with comments | « net/quic/platform/impl/quic_ptr_util_impl.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698