aboutsummaryrefslogtreecommitdiff
path: root/advtrains/textures/advtrains_track_swrst_45.png
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-11-23 17:00:39 +0100
committerorwell96 <orwell@bleipb.de>2017-11-23 17:00:39 +0100
commitd78d07589d31db62167eafafb36b9e8c0468c6d1 (patch)
treeabc9647e10c9f27d311b179a6d02871c1658097c /advtrains/textures/advtrains_track_swrst_45.png
parent5fc6cc7f5b7125e470e0e24e4da639f868476dc3 (diff)
downloadadvtrains-d78d07589d31db62167eafafb36b9e8c0468c6d1.tar.gz
advtrains-d78d07589d31db62167eafafb36b9e8c0468c6d1.tar.bz2
advtrains-d78d07589d31db62167eafafb36b9e8c0468c6d1.zip
Add modifiable wagon extents
This will be required for advcarts
Diffstat (limited to 'advtrains/textures/advtrains_track_swrst_45.png')
0 files changed, 0 insertions, 0 deletions
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
/*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef UTIL_THREAD_HEADER
#define UTIL_THREAD_HEADER

#include "../irrlichttypes.h"
#include "../jthread/jthread.h"
#include "../jthread/jmutex.h"
#include "../jthread/jmutexautolock.h"
#include "porting.h"

template<typename T>
class MutexedVariable
{
public:
	MutexedVariable(T value):
		m_value(value)
	{
	}

	T get()
	{
		JMutexAutoLock lock(m_mutex);
		return m_value;
	}

	void set(T value)
	{
		JMutexAutoLock lock(m_mutex);
		m_value = value;
	}