all: more assorted cleanups; NFCI

This commit is contained in:
Markus F.X.J. Oberhumer
2024-02-02 10:17:16 +01:00
parent d429801498
commit 718ec468ff
26 changed files with 307 additions and 125 deletions
+6 -6
View File
@@ -178,9 +178,9 @@ packed_struct(Sym) {
#define WANT_SYM_ENUM 1
#include "p_elf_enum.h"
static unsigned int get_st_bind(unsigned x) { return 0xf & (x >> 4); }
static unsigned int get_st_type(unsigned x) { return 0xf & x; }
static unsigned char make_st_info(unsigned bind, unsigned type) {
static constexpr unsigned get_st_bind(unsigned x) noexcept { return 0xf & (x >> 4); }
static constexpr unsigned get_st_type(unsigned x) noexcept { return 0xf & x; }
static constexpr unsigned char make_st_info(unsigned bind, unsigned type) noexcept {
return (unsigned char) (((bind << 4) + (0xf & type)) & 0xff);
}
};
@@ -252,9 +252,9 @@ packed_struct(Sym) {
#define WANT_SYM_ENUM 1
#include "p_elf_enum.h"
static unsigned int get_st_bind(unsigned x) { return 0xf & (x >> 4); }
static unsigned int get_st_type(unsigned x) { return 0xf & x; }
static unsigned char make_st_info(unsigned bind, unsigned type) {
static constexpr unsigned get_st_bind(unsigned x) noexcept { return 0xf & (x >> 4); }
static constexpr unsigned get_st_type(unsigned x) noexcept { return 0xf & x; }
static constexpr unsigned char make_st_info(unsigned bind, unsigned type) noexcept {
return (unsigned char) (((bind << 4) + (0xf & type)) & 0xff);
}
};