* Clean up. Not functional changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27158 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Salvatore Benedetto 2008-08-22 19:07:21 +00:00
parent 613ecaf5f9
commit 2e39d2c54f
3 changed files with 21 additions and 18 deletions

View File

@ -85,6 +85,7 @@ AllocationDescriptorList<Accessor>::AllocationDescriptorList(Icb *icb,
_WalkContinuationChain(_CurrentDescriptor());
}
/*! \brief Finds the extent for the given address in the stream,
returning it in the address pointed to by \a blockRun.
@ -130,7 +131,7 @@ AllocationDescriptorList<Accessor>::FindExtent(off_t start,
_MoveToNextDescriptor();
}
} else {
TRACE_ERROR(("UDF: AllocationDescriptorList<>::FindExtent: "
TRACE_ERROR(("AllocationDescriptorList<>::FindExtent: "
"Descriptor #%ld found NULL\n", _DescriptorNumber()));
status = B_ERROR;
break;
@ -143,6 +144,7 @@ AllocationDescriptorList<Accessor>::FindExtent(off_t start,
// #pragma - Private methods
template<class Accessor>
AllocationDescriptorList<Accessor>::Descriptor*
AllocationDescriptorList<Accessor>::_CurrentDescriptor() const
@ -242,6 +244,7 @@ AllocationDescriptorList<Accessor>::_DescriptorArraySize() const
// pragma - Accessors
class ShortDescriptorAccessor {
public:
ShortDescriptorAccessor(uint16 partition)
@ -303,4 +306,3 @@ public:
};
#endif // _UDF_ALLOCATION_DESCRIPTOR_LIST_H

View File

@ -1,9 +1,7 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//
// Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
//---------------------------------------------------------------------
/*
* Copyright, 2003, Tyler Dauwalder, tyler@dauwalder.net.
* Distributed under the terms of the MIT License.
*/
#ifndef _UDF_ARRAY_H
#define _UDF_ARRAY_H
@ -36,8 +34,8 @@ public:
DataType data[arrayLength];
};
/*! \brief \c uint8 specialization of the \c array template struct.
*/
/*! \brief \c uint8 specialization of the \c array template struct. */
template<uint32 arrayLength>
struct array<uint8, arrayLength> {
void dump() const
@ -50,19 +48,20 @@ struct array<uint8, arrayLength> {
for (uint32 i = 0; i < arrayLength; i++) {
if (i % bytesPerRow == 0)
PRINT(("[%ld:%ld]: ", i, i+bytesPerRow-1));
PRINT(("[%ld:%ld]: ", i, i + bytesPerRow - 1));
SIMPLE_PRINT(("0x%.2x ", data[i]));
if ((i+1) % bytesPerRow == 0 || i+1 == arrayLength)
if ((i + 1) % bytesPerRow == 0 || i + 1 == arrayLength)
SIMPLE_PRINT(("\n"));
}
}
uint32 length() const { return arrayLength; }
uint32 size() const { return arrayLength; }
uint8 data[arrayLength];
};
/*! \brief \c char specialization of the \c array template struct.
*/
/*! \brief \c char specialization of the \c array template struct. */
template<uint32 arrayLength>
struct array<char, arrayLength> {
void dump() const
@ -75,12 +74,13 @@ struct array<char, arrayLength> {
for (uint32 i = 0; i < arrayLength; i++) {
if (i % bytesPerRow == 0)
PRINT(("[%ld:%ld]: ", i, i+bytesPerRow-1));
PRINT(("[%ld:%ld]: ", i, i + bytesPerRow - 1));
SIMPLE_PRINT(("0x%.2x ", data[i]));
if ((i+1) % bytesPerRow == 0 || i+1 == arrayLength)
if ((i + 1) % bytesPerRow == 0 || i + 1 == arrayLength)
SIMPLE_PRINT(("\n"));
}
}
uint32 length() const { return arrayLength; }
uint32 size() const { return arrayLength; }
uint8 data[arrayLength];

View File

@ -131,6 +131,7 @@ CachedBlock::SetTo(long_address address)
return NULL;
}
template <class Accessor, class Descriptor>
inline uint8*
CachedBlock::SetTo(Accessor &accessor, Descriptor &descriptor)