Update copyright year in license to 2019 (#1524)

Also update clang-format to 6.0.
This commit is contained in:
Tyler Veness
2019-05-17 17:35:09 -07:00
committed by Peter Johnson
parent 1726b77ac5
commit f432f65bef
96 changed files with 202 additions and 190 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -77,7 +77,7 @@ void HttpServerConnection::BuildHeader(raw_ostream& os, int code,
void HttpServerConnection::SendData(ArrayRef<uv::Buffer> bufs,
bool closeAfter) {
m_stream.Write(bufs, [ closeAfter, stream = &m_stream ](
m_stream.Write(bufs, [closeAfter, stream = &m_stream](
MutableArrayRef<uv::Buffer> bufs, uv::Error) {
for (auto&& buf : bufs) buf.Deallocate();
if (closeAfter) stream->Close();
@@ -113,7 +113,7 @@ void HttpServerConnection::SendStaticResponse(int code, const Twine& codeText,
// can send content without copying
bufs.emplace_back(content);
m_stream.Write(bufs, [ closeAfter = !m_keepAlive, stream = &m_stream ](
m_stream.Write(bufs, [closeAfter = !m_keepAlive, stream = &m_stream](
MutableArrayRef<uv::Buffer> bufs, uv::Error) {
// don't deallocate the static content
for (auto&& buf : bufs.drop_back()) buf.Deallocate();

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -96,7 +96,7 @@ WebSocketServer::WebSocketServer(uv::Stream& stream,
auto ws = m_helper.Accept(m_stream, protocol);
// Connect the websocket open event to our connected event.
ws->open.connect_extended([ self, s = ws.get() ](auto conn, StringRef) {
ws->open.connect_extended([self, s = ws.get()](auto conn, StringRef) {
self->connected(self->m_req.GetUrl(), *s);
conn.disconnect(); // one-shot
});

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -26,7 +26,7 @@ std::shared_ptr<Timer> Timer::Create(Loop& loop) {
void Timer::SingleShot(Loop& loop, Time timeout, std::function<void()> func) {
auto h = Create(loop);
if (!h) return;
h->timeout.connect([ theTimer = h.get(), func ]() {
h->timeout.connect([theTimer = h.get(), func]() {
func();
theTimer->Close();
});