fixed /r and tab text alignment

This commit is contained in:
fourtf
2018-05-25 13:53:55 +02:00
parent b68b7ecb10
commit 9aa9b90267
13 changed files with 140 additions and 41 deletions
+40
View File
@@ -0,0 +1,40 @@
#pragma once
#include <mutex>
namespace chatterino {
namespace util {
template <typename T>
class MutexValue
{
mutable std::mutex mutex;
T value;
public:
MutexValue()
{
}
MutexValue(T &&val)
: value(val)
{
}
T get() const
{
std::lock_guard<std::mutex> guard(this->mutex);
return this->value;
}
void set(const T &val)
{
std::lock_guard<std::mutex> guard(this->mutex);
this->value = val;
}
};
} // namespace util
} // namespace chatterino