polybar-dwm/include/utils/macros.hpp
Michael Carlberg 39d3f61497 refactor(core): Clean-up
- use "#pragma once" instead of the regular include guard
- fix errors and warnings reported by cppcheck
2016-06-02 01:32:06 +02:00

14 lines
404 B
C++

#pragma once
#define writeln(s) std::cout << s << std::endl
#define writeln_ss(s) { std::stringstream ss; ss << s; writeln(ss.str()); std::stringstream s; }
#define ToStr(s) std::string(s)
#define IntToStr(s) std::to_string(s)
#define StrErrno() ToStr(std::strerror(errno))
#define StrErrnoCustom(s) ToStr(std::strerror(s))
#define StrSignal(sig) IntToStr(sig)
#define StrSignalC(sig) strsignal(sig)