Style cleanup (thanks Korli!)
No functional changes, except for the two traces removed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
19838430ab
commit
c663bd36d3
@ -10,10 +10,10 @@
|
||||
#include "ConfigView.h"
|
||||
#include "WebPTranslator.h"
|
||||
|
||||
#include <StringView.h>
|
||||
#include <CheckBox.h>
|
||||
#include <GroupLayout.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <StringView.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -24,7 +24,7 @@ ConfigView::ConfigView(uint32 flags)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
|
||||
BStringView *fTitle = new BStringView("title", "WebP Images");
|
||||
BStringView* fTitle = new BStringView("title", "WebP Images");
|
||||
fTitle->SetFont(be_bold_font);
|
||||
|
||||
char version[256];
|
||||
@ -33,15 +33,15 @@ ConfigView::ConfigView(uint32 flags)
|
||||
int(B_TRANSLATION_MINOR_VERSION(WEBP_TRANSLATOR_VERSION)),
|
||||
int(B_TRANSLATION_REVISION_VERSION(WEBP_TRANSLATOR_VERSION)),
|
||||
__DATE__);
|
||||
BStringView *fVersion = new BStringView("version", version);
|
||||
BStringView* fVersion = new BStringView("version", version);
|
||||
|
||||
BStringView *fCopyright = new BStringView("copyright",
|
||||
BStringView* fCopyright = new BStringView("copyright",
|
||||
B_UTF8_COPYRIGHT "2010 Haiku Inc.");
|
||||
|
||||
BStringView *fCopyright2 = new BStringView("copyright2",
|
||||
BStringView* fCopyright2 = new BStringView("copyright2",
|
||||
"Based on libwebp v0.1");
|
||||
|
||||
BStringView *fCopyright3 = new BStringView("copyright3",
|
||||
BStringView* fCopyright3 = new BStringView("copyright3",
|
||||
B_UTF8_COPYRIGHT "2010 Google Inc.");
|
||||
|
||||
// Build the layout
|
||||
|
@ -13,9 +13,10 @@
|
||||
|
||||
|
||||
class ConfigView : public BView {
|
||||
public:
|
||||
ConfigView(uint32 flags = B_WILL_DRAW);
|
||||
virtual ~ConfigView();
|
||||
public:
|
||||
ConfigView(uint32 flags = B_WILL_DRAW);
|
||||
virtual ~ConfigView();
|
||||
};
|
||||
|
||||
|
||||
#endif /* CONFIG_VIEW_H */
|
||||
|
@ -83,8 +83,7 @@ WebPTranslator::WebPTranslator()
|
||||
WEBP_TRANSLATOR_VERSION,
|
||||
sInputFormats, kNumInputFormats,
|
||||
sOutputFormats, kNumOutputFormats,
|
||||
"WebPTranslator_Settings",
|
||||
sDefaultSettings, kNumDefaultSettings,
|
||||
"WebPTranslator_Settings", sDefaultSettings, kNumDefaultSettings,
|
||||
B_TRANSLATOR_BITMAP, WEBP_IMAGE_FORMAT)
|
||||
{
|
||||
}
|
||||
@ -96,9 +95,9 @@ WebPTranslator::~WebPTranslator()
|
||||
|
||||
|
||||
status_t
|
||||
WebPTranslator::DerivedIdentify(BPositionIO *stream,
|
||||
const translation_format *format, BMessage *settings,
|
||||
translator_info *info, uint32 outType)
|
||||
WebPTranslator::DerivedIdentify(BPositionIO* stream,
|
||||
const translation_format* format, BMessage* settings,
|
||||
translator_info* info, uint32 outType)
|
||||
{
|
||||
if (!outType)
|
||||
outType = B_TRANSLATOR_BITMAP;
|
||||
@ -129,9 +128,9 @@ WebPTranslator::DerivedIdentify(BPositionIO *stream,
|
||||
|
||||
|
||||
status_t
|
||||
WebPTranslator::DerivedTranslate(BPositionIO *stream,
|
||||
const translator_info *info, BMessage *settings,
|
||||
uint32 outType, BPositionIO *target, int32 baseType)
|
||||
WebPTranslator::DerivedTranslate(BPositionIO* stream,
|
||||
const translator_info* info, BMessage* settings,
|
||||
uint32 outType, BPositionIO* target, int32 baseType)
|
||||
{
|
||||
if (!outType)
|
||||
outType = B_TRANSLATOR_BITMAP;
|
||||
@ -159,11 +158,8 @@ WebPTranslator::DerivedTranslate(BPositionIO *stream,
|
||||
free(streamData);
|
||||
|
||||
if (out == NULL) {
|
||||
printf("WebPDecodeRGB(%p, %lld) failed.\n", streamData, streamSize);
|
||||
return B_ILLEGAL_DATA;
|
||||
}
|
||||
printf("WebPDecodeRGB(%p, %lld) succeed: %d x %d WebP image decoded.\n",
|
||||
streamData, streamSize, width, height);
|
||||
|
||||
FreeAllocation _(out);
|
||||
|
||||
@ -192,6 +188,7 @@ WebPTranslator::DerivedTranslate(BPositionIO *stream,
|
||||
|
||||
if (headerOnly)
|
||||
return B_OK;
|
||||
|
||||
uint32 dataLeft = dataSize;
|
||||
uint8* p = out;
|
||||
uint8 rgb[3];
|
||||
@ -216,8 +213,8 @@ WebPTranslator::DerivedTranslate(BPositionIO *stream,
|
||||
|
||||
|
||||
|
||||
BView *
|
||||
WebPTranslator::NewConfigView(TranslatorSettings *settings)
|
||||
BView*
|
||||
WebPTranslator::NewConfigView(TranslatorSettings* settings)
|
||||
{
|
||||
return new ConfigView();
|
||||
}
|
||||
@ -226,7 +223,7 @@ WebPTranslator::NewConfigView(TranslatorSettings *settings)
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
BTranslator *
|
||||
BTranslator*
|
||||
make_nth_translator(int32 n, image_id you, uint32 flags, ...)
|
||||
{
|
||||
if (n != 0)
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef WEBP_TRANSLATOR_H
|
||||
#define WEBP_TRANSLATOR_H
|
||||
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <DataIO.h>
|
||||
#include <File.h>
|
||||
@ -29,25 +30,29 @@
|
||||
#define BITS_OUT_QUALITY 1
|
||||
#define BITS_OUT_CAPABILITY 0.9
|
||||
|
||||
|
||||
class WebPTranslator : public BaseTranslator {
|
||||
public:
|
||||
WebPTranslator();
|
||||
WebPTranslator();
|
||||
|
||||
virtual status_t DerivedIdentify(BPositionIO *inSource,
|
||||
const translation_format *inFormat, BMessage *ioExtension,
|
||||
translator_info *outInfo, uint32 outType);
|
||||
virtual status_t DerivedIdentify(BPositionIO* stream,
|
||||
const translation_format* format,
|
||||
BMessage* settings, translator_info* info,
|
||||
uint32 outType);
|
||||
|
||||
virtual status_t DerivedTranslate(BPositionIO *inSource,
|
||||
const translator_info *inInfo, BMessage *ioExtension,
|
||||
uint32 outType, BPositionIO *outDestination, int32 baseType);
|
||||
virtual status_t DerivedTranslate(BPositionIO* stream,
|
||||
const translator_info* info,
|
||||
BMessage* settings, uint32 outType,
|
||||
BPositionIO* target, int32 baseType);
|
||||
|
||||
virtual BView *NewConfigView(TranslatorSettings *settings);
|
||||
virtual BView* NewConfigView(TranslatorSettings* settings);
|
||||
|
||||
protected:
|
||||
virtual ~WebPTranslator();
|
||||
virtual ~WebPTranslator();
|
||||
// this is protected because the object is deleted by the
|
||||
// Release() function instead of being deleted directly by
|
||||
// the user
|
||||
};
|
||||
|
||||
|
||||
#endif // #ifndef WEBP_TRANSLATOR_H
|
||||
|
Loading…
Reference in New Issue
Block a user