BResources::SetToImage(): Compile conditionally based on
HAIKU_TARGET_PLATFORM_HAIKU, so the file can also be compiled for the host platform. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42178 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -262,6 +262,7 @@ BResources::SetTo(const entry_ref* ref, bool clobber)
|
||||
status_t
|
||||
BResources::SetToImage(image_id image, bool clobber)
|
||||
{
|
||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||
// get an image info
|
||||
image_info info;
|
||||
status_t error = get_image_info(image, &info);
|
||||
@@ -272,6 +273,9 @@ BResources::SetToImage(image_id image, bool clobber)
|
||||
|
||||
// delegate the actual work
|
||||
return SetTo(info.name, clobber);
|
||||
#else // HAIKU_TARGET_PLATFORM_HAIKU
|
||||
return B_NOT_SUPPORTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*! \brief Re-initialized the BResources object to represent the resources of
|
||||
@@ -291,6 +295,7 @@ BResources::SetToImage(image_id image, bool clobber)
|
||||
status_t
|
||||
BResources::SetToImage(const void* codeOrDataPointer, bool clobber)
|
||||
{
|
||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||
if (!codeOrDataPointer)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
@@ -309,6 +314,9 @@ BResources::SetToImage(const void* codeOrDataPointer, bool clobber)
|
||||
}
|
||||
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
#else // HAIKU_TARGET_PLATFORM_HAIKU
|
||||
return B_NOT_SUPPORTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Unset
|
||||
|
||||
Reference in New Issue
Block a user