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

View File

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

View File

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