Panda3D
dtool
src
prc
reversedNumericData.cxx
1
// Filename: reversedNumericData.cxx
2
// Created by: drose (09May01)
3
//
4
////////////////////////////////////////////////////////////////////
5
//
6
// PANDA 3D SOFTWARE
7
// Copyright (c) Carnegie Mellon University. All rights reserved.
8
//
9
// All use of this software is subject to the terms of the revised BSD
10
// license. You should have received a copy of this license along
11
// with this source code in a file named "LICENSE."
12
//
13
////////////////////////////////////////////////////////////////////
14
15
16
#include "pnotify.h"
17
18
#include "reversedNumericData.h"
19
20
////////////////////////////////////////////////////////////////////
21
// Function: ReversedNumericData::reverse_assign
22
// Access: Private
23
// Description: Actually does the data reversal.
24
////////////////////////////////////////////////////////////////////
25
void
ReversedNumericData::
26
reverse_assign(
const
char
*source,
size_t
length) {
27
nassertv((
int
)length <= max_numeric_size);
28
for
(
size_t
i = 0; i < length; i++) {
29
_data[i] = source[length - 1 - i];
30
}
31
}
Generated on Wed May 17 2017 23:39:38 for Panda3D by
1.8.13