* 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:
parent
613ecaf5f9
commit
2e39d2c54f
@ -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
|
||||
|
||||
|
@ -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
|
||||
@ -70,17 +69,18 @@ struct array<char, arrayLength> {
|
||||
const uint8 bytesPerRow = 8;
|
||||
char classname[40];
|
||||
sprintf(classname, "array<uint8, %ld>", arrayLength);
|
||||
|
||||
|
||||
DUMP_INIT(classname);
|
||||
|
||||
|
||||
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];
|
||||
|
@ -131,6 +131,7 @@ CachedBlock::SetTo(long_address address)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
template <class Accessor, class Descriptor>
|
||||
inline uint8*
|
||||
CachedBlock::SetTo(Accessor &accessor, Descriptor &descriptor)
|
||||
|
Loading…
x
Reference in New Issue
Block a user