Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SharedMemory.cpp « mumble « src - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8a2a203220cfbe864e0c1a3113c866eeefa72a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2010-2021 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.

#include "SharedMemory.h"

unsigned int SharedMemory2::uiIndex = 0;

QString SharedMemory2::name() const {
	return a_ucData ? qsName : QString();
}

unsigned int SharedMemory2::size() const {
	return a_ucData ? uiSize : 0;
}

unsigned char *SharedMemory2::data() {
	return a_ucData;
}

const unsigned char *SharedMemory2::data() const {
	return a_ucData;
}

void SharedMemory2::erase() {
	if (a_ucData) {
		memset(a_ucData, 0, uiSize);
	}
}