Skip to content

Commit 67c6e75

Browse files
committed
Fixes
1 parent 907e2bf commit 67c6e75

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/IO/ParallelReadBuffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ bool ParallelReadBuffer::nextImpl()
178178
return false;
179179
}
180180

181-
auto w = read_workers.front().get();
181+
auto * w = read_workers.front().get();
182182

183183
std::unique_lock lock{w->worker_mutex};
184184

@@ -293,7 +293,7 @@ void ParallelReadBuffer::finishAndWait()
293293

294294
std::unique_ptr<ParallelReadBuffer> wrapInParallelReadBufferIfSupported(ReadBuffer & buf, size_t max_working_readers, size_t range_step, size_t file_size)
295295
{
296-
auto seekable = dynamic_cast<SeekableReadBuffer*>(&buf);
296+
auto * seekable = dynamic_cast<SeekableReadBuffer*>(&buf);
297297
if (!seekable || !seekable->supportsReadAt())
298298
return nullptr;
299299

src/IO/ReadWriteBufferFromHTTP.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ static Poco::URI getUriAfterRedirect(const Poco::URI & prev_uri, Poco::Net::HTTP
4848

4949
template <typename TSessionFactory>
5050
UpdatableSession<TSessionFactory>::UpdatableSession(const Poco::URI & uri, UInt64 max_redirects_, std::shared_ptr<TSessionFactory> session_factory_)
51-
: max_redirects{max_redirects_}
51+
: session_factory(std::move(session_factory_))
52+
, max_redirects{max_redirects_}
5253
, initial_uri(uri)
53-
, session_factory(std::move(session_factory_))
5454
{
5555
session = session_factory->buildNewSession(uri);
5656
}
@@ -108,7 +108,7 @@ void ReadWriteBufferFromHTTPBase<UpdatableSessionPtr>::prepareRequest(Poco::Net:
108108
else if (method == Poco::Net::HTTPRequest::HTTP_POST)
109109
request.setContentLength(0); /// No callback - no body
110110

111-
for (auto & [header, value] : http_header_entries)
111+
for (const auto & [header, value] : http_header_entries)
112112
request.set(header, value);
113113

114114
if (range)
@@ -635,7 +635,7 @@ size_t ReadWriteBufferFromHTTPBase<UpdatableSessionPtr>::readBigAt(char * to, si
635635
if (e.code() == POCO_EMFILE)
636636
throw;
637637

638-
if (auto h = dynamic_cast<const HTTPException*>(&e);
638+
if (const auto h = dynamic_cast<const HTTPException*>(&e);
639639
h && !isRetriableError(static_cast<Poco::Net::HTTPResponse::HTTPStatus>(h->getHTTPStatus())))
640640
throw;
641641

src/IO/ReadWriteBufferFromHTTP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ class UpdatableSession
4848
std::shared_ptr<UpdatableSession<TSessionFactory>> clone(const Poco::URI & uri);
4949

5050
private:
51+
std::shared_ptr<TSessionFactory> session_factory;
5152
SessionPtr session;
5253
UInt64 redirects{0};
5354
UInt64 max_redirects;
5455
Poco::URI initial_uri;
55-
std::shared_ptr<TSessionFactory> session_factory;
5656
};
5757

5858

0 commit comments

Comments
 (0)