Skip to content

Commit

Permalink
Make all src/transport headers use pragma once (#3139)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Oct 9, 2020
1 parent a2c6dad commit 0edb32d
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 63 deletions.
5 changes: 1 addition & 4 deletions src/transport/BLE.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
*
*/

#ifndef __TRANSPORT_BLE_H__
#define __TRANSPORT_BLE_H__
#pragma once

#include <ble/BleConfig.h>

Expand Down Expand Up @@ -111,5 +110,3 @@ class DLL_EXPORT BLE : public Base

} // namespace Transport
} // namespace chip

#endif // __TRANSPORT_BLE_H__
4 changes: 1 addition & 3 deletions src/transport/NetworkProvisioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
*
*/

#ifndef __CHIP_NETWORK_PROVISIONING_H__
#define __CHIP_NETWORK_PROVISIONING_H__
#pragma once

#include <core/CHIPCore.h>
#include <core/ReferenceCounted.h>
Expand Down Expand Up @@ -137,4 +136,3 @@ class DLL_EXPORT NetworkProvisioning
};

} // namespace chip
#endif // __CHIP_NETWORK_PROVISIONING_H__
5 changes: 1 addition & 4 deletions src/transport/PeerConnectionState.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* @brief Defines state relevant for an active connection to a peer.
*/

#ifndef PEER_CONNCTION_STATE_H_
#define PEER_CONNCTION_STATE_H_
#pragma once

#include <transport/SecureSession.h>
#include <transport/raw/MessageHeader.h>
Expand Down Expand Up @@ -106,5 +105,3 @@ class PeerConnectionState

} // namespace Transport
} // namespace chip

#endif // PEER_CONNCTION_STATE_H_
5 changes: 1 addition & 4 deletions src/transport/RendezvousParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* limitations under the License.
*/

#ifndef __TRANSPORT_RENDEZVOUSPARAMETERS_H__
#define __TRANSPORT_RENDEZVOUSPARAMETERS_H__
#pragma once

#include <transport/raw/Base.h>

Expand Down Expand Up @@ -91,5 +90,3 @@ class RendezvousParameters
};

} // namespace chip

#endif // __TRANSPORT_RENDEZVOUSPARAMETERS_H__
5 changes: 1 addition & 4 deletions src/transport/RendezvousSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
* This file defines the CHIP RendezvousSession object that maintains a Rendezvous session.
*
*/

#ifndef __TRANSPORT_RENDEZVOUSSESSION_H__
#define __TRANSPORT_RENDEZVOUSSESSION_H__
#pragma once

#include <core/CHIPCore.h>
#include <protocols/CHIPProtocols.h>
Expand Down Expand Up @@ -147,4 +145,3 @@ class RendezvousSession : public SecurePairingSessionDelegate,
};

} // namespace chip
#endif // __TRANSPORT_RENDEZVOUSSESSION_H__
5 changes: 1 addition & 4 deletions src/transport/RendezvousSessionDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* limitations under the License.
*/

#ifndef __TRANSPORT_RENDEZVOUSSESSIONCALLBACK_H__
#define __TRANSPORT_RENDEZVOUSSESSIONCALLBACK_H__
#pragma once

#include <core/CHIPCore.h>

Expand Down Expand Up @@ -52,5 +51,3 @@ class DLL_EXPORT RendezvousDeviceCredentialsDelegate
};

} // namespace chip

#endif // __TRANSPORT_RENDEZVOUSSESSIONCALLBACK_H__
5 changes: 1 addition & 4 deletions src/transport/SecurePairingSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
*
*/

#ifndef __SECUREPAIRINGSESSION_H__
#define __SECUREPAIRINGSESSION_H__
#pragma once

#include <core/ReferenceCounted.h>
#include <crypto/CHIPCryptoPAL.h>
Expand Down Expand Up @@ -250,5 +249,3 @@ class SecurePairingUsingTestSecret : public SecurePairingSession
};

} // namespace chip

#endif // __SECUREPAIRINGSESSION_H__
5 changes: 1 addition & 4 deletions src/transport/SecureSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
*
*/

#ifndef __SECURESESSION_H__
#define __SECURESESSION_H__
#pragma once

#include <core/CHIPCore.h>
#include <crypto/CHIPCryptoPAL.h>
Expand Down Expand Up @@ -134,5 +133,3 @@ class DLL_EXPORT SecureSession
};

} // namespace chip

#endif // __SECURESESSION_H__
5 changes: 1 addition & 4 deletions src/transport/SecureSessionMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
*
*/

#ifndef __SECURESESSIONMGR_H__
#define __SECURESESSIONMGR_H__
#pragma once

#include <utility>

Expand Down Expand Up @@ -217,5 +216,3 @@ class SecureSessionMgr : public SecureSessionMgrBase
};

} // namespace chip

#endif // __SECURESESSIONMGR_H__
5 changes: 1 addition & 4 deletions src/transport/raw/Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
* classes (UDP, TCP, BLE, ....)
*/

#ifndef TRANSPORT_BASE_H_
#define TRANSPORT_BASE_H_
#pragma once

#include <core/CHIPError.h>
#include <core/ReferenceCounted.h>
Expand Down Expand Up @@ -118,5 +117,3 @@ class Base : public ReferenceCounted<Base>

} // namespace Transport
} // namespace chip

#endif // TRANSPORT_BASE_H_
5 changes: 1 addition & 4 deletions src/transport/raw/PeerAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
*
*/

#ifndef PEER_ADDRESS_H_
#define PEER_ADDRESS_H_
#pragma once

#include <stdio.h>

Expand Down Expand Up @@ -171,5 +170,3 @@ class PeerAddress

} // namespace Transport
} // namespace chip

#endif // PEER_ADDRESS_H_
5 changes: 1 addition & 4 deletions src/transport/raw/TCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
* It binds to any available local addr and port and begins listening.
*/

#ifndef __TCPTRANSPORT_H__
#define __TCPTRANSPORT_H__
#pragma once

#include <algorithm>
#include <utility>
Expand Down Expand Up @@ -247,5 +246,3 @@ class TCP : public TCPBase

} // namespace Transport
} // namespace chip

#endif // __TCPTRANSPORT_H__
5 changes: 1 addition & 4 deletions src/transport/raw/Tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
* Defines a compound transport type (tuple) that can merge several transports
* to look like a single one.
*/
#ifndef TRANSPORT_TUPLE_H_
#define TRANSPORT_TUPLE_H_
#pragma once

#include <tuple>
#include <type_traits>
Expand Down Expand Up @@ -238,5 +237,3 @@ class Tuple : public Base

} // namespace Transport
} // namespace chip

#endif // TRANSPORT_TUPLE_H_
5 changes: 1 addition & 4 deletions src/transport/raw/UDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
*
*/

#ifndef __UDPTRANSPORT_H__
#define __UDPTRANSPORT_H__
#pragma once

#include <utility>

Expand Down Expand Up @@ -126,5 +125,3 @@ class DLL_EXPORT UDP : public Base

} // namespace Transport
} // namespace chip

#endif // __UDPTRANSPORT_H__
5 changes: 1 addition & 4 deletions src/transport/retransmit/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef RETRANSIMIT_CACHE_H_
#define RETRANSIMIT_CACHE_H_
#pragma once

#include <bitset>
#include <cstddef>
Expand Down Expand Up @@ -177,5 +176,3 @@ class Cache

} // namespace Retransmit
} // namespace chip

#endif // RETRANSIMIT_CACHE_H_
5 changes: 1 addition & 4 deletions src/transport/tests/TestTransportLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
*
*/

#ifndef TESTTRANSPORTLAYER_H
#define TESTTRANSPORTLAYER_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -40,5 +39,3 @@ int TestUDP(void);
#ifdef __cplusplus
}
#endif

#endif // TESTTRANSPORTLAYER_H

0 comments on commit 0edb32d

Please sign in to comment.