Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Mar 2, 2024
1 parent 1e8e2fc commit b788136
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions CMake/FindAtomics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ include(CheckCXXSourceCompiles)

# RISC-V only has 32-bit and 64-bit atomic instructions. GCC is supposed
# to convert smaller atomics to those larger ones via masking and
# shifting like LLVM, but its a known bug that it does not. This means
# shifting like LLVM, but it's a known bug that it does not. This means
# anything that wants to use atomics on 1-byte or 2-byte types needs
# to link atomic library, but not 4-byte or 8-byte (though it does no harm).
set(ATOMIC_CODE
"
#include <atomic>
#include <cstdint>
std::atomic<std::uint8_t> n8(0); // riscv64
std::atomic<std::uint64_t> n64(0); // armel, mipsel, powerpc
int main() {
++n8;
++n64;
}")
#include <atomic>
#include <cstdint>
std::atomic<std::uint8_t> n8{0}; // riscv64
std::atomic<std::uint64_t> n64{0}; // armel, mipsel, powerpc
int main() {
++n8;
++n64;
}")

set(ATOMICS_LIBS " " "-latomic")
if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
Expand Down
1 change: 0 additions & 1 deletion td/telegram/ContactsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@

#include <algorithm>
#include <limits>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
Expand Down
1 change: 0 additions & 1 deletion td/telegram/ContactsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "td/telegram/DialogInviteLink.h"
#include "td/telegram/DialogLocation.h"
#include "td/telegram/DialogParticipant.h"
#include "td/telegram/DialogParticipantFilter.h"
#include "td/telegram/EmojiStatus.h"
#include "td/telegram/files/FileId.h"
#include "td/telegram/files/FileSourceId.h"
Expand Down
2 changes: 2 additions & 0 deletions td/telegram/DialogParticipantManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@
#include "td/utils/Hints.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/Slice.h"
#include "td/utils/SliceBuilder.h"
#include "td/utils/Status.h"
#include "td/utils/Time.h"

#include <algorithm>
#include <limits>
#include <tuple>

namespace td {

Expand Down

0 comments on commit b788136

Please sign in to comment.