Make some structs nested
[openal-soft.git] / core / fpu_ctrl.h
blob9554313ae047efb8ffb1726518d4cbdd2f76d5a6
1 #ifndef CORE_FPU_CTRL_H
2 #define CORE_FPU_CTRL_H
4 class FPUCtl {
5 #if defined(HAVE_SSE_INTRINSICS) || (defined(__GNUC__) && defined(HAVE_SSE))
6 unsigned int sse_state{};
7 #endif
8 bool in_mode{};
10 public:
11 FPUCtl() noexcept { enter(); in_mode = true; }
12 ~FPUCtl() { if(in_mode) leave(); }
14 FPUCtl(const FPUCtl&) = delete;
15 FPUCtl& operator=(const FPUCtl&) = delete;
17 void enter() noexcept;
18 void leave() noexcept;
21 #endif /* CORE_FPU_CTRL_H */