kranewm

An ICCCM & EWMH compliant X11 reparenting, dynamic window manager, written in C++
git clone git://git.deurzen.net/kranewm
Log | Files | Refs | LICENSE

util.cc (392B)


      1 #include "util.hh"
      2 
      3 #include <utility>
      4 
      5 extern "C" {
      6 #include <unistd.h>
      7 }
      8 
      9 void
     10 Util::die(const std::string&& msg)
     11 {
     12     std::cerr << msg << std::endl;
     13     exit(1);
     14 }
     15 
     16 void
     17 Util::warn(const std::string&& msg)
     18 {
     19     std::cerr << msg << std::endl;
     20 }
     21 
     22 void
     23 Util::assert(bool condition, const std::string&& msg)
     24 {
     25     if (!condition)
     26         Util::die(std::forward<const std::string&&>(msg));
     27 }