From 7dbf987f55192a836d38ae890c3f7df87e66d91d Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Sun, 11 Jun 2023 19:21:24 +0000 Subject: [PATCH] wimax: Use bitwise operations instead of power-2 multiplications --- src/wimax/model/simple-ofdm-wimax-phy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wimax/model/simple-ofdm-wimax-phy.cc b/src/wimax/model/simple-ofdm-wimax-phy.cc index 6a73e18e0..282de8946 100644 --- a/src/wimax/model/simple-ofdm-wimax-phy.cc +++ b/src/wimax/model/simple-ofdm-wimax-phy.cc @@ -547,7 +547,7 @@ SimpleOfdmWimaxPhy::ConvertBitsToBurst(Bvec buffer) for (int l = 0; l < 8; l++) { bool bin = buffer.at(i + l); - temp += (uint8_t)(bin * std::pow(2.0, (7 - l))); + temp |= (bin << (7 - l)); } *(pstart + j) = temp;