update code style

This commit is contained in:
vcaesar 2018-06-11 21:47:55 +08:00
parent 567604a5e1
commit 28c7ccf563
3 changed files with 19 additions and 18 deletions

View File

@ -8,6 +8,16 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#include "bitmap_class.h"
#include "bitmap_find_c.h"
#include "../base/color_find_c.h"
// #include "../screen/screen_c.h"
#include "../base/io_c.h"
#include "../base/pasteboard_c.h"
#include "../base/str_io_c.h"
#include <assert.h>
#include <stdio.h>
// class BMP // class BMP
// { // {
// public: // public:
@ -18,15 +28,6 @@
// uint8_t bytesPerPixel; // uint8_t bytesPerPixel;
// uint8_t *image; // uint8_t *image;
// }; // };
#include "bitmap_class.h"
#include "bitmap_find_c.h"
#include "../base/color_find_c.h"
// #include "../screen/screen_c.h"
#include "../base/io_c.h"
#include "../base/pasteboard_c.h"
#include "../base/str_io_c.h"
#include <assert.h>
#include <stdio.h>
/* Returns false and sets error if |bitmap| is NULL. */ /* Returns false and sets error if |bitmap| is NULL. */
bool bitmap_ready(MMBitmapRef bitmap){ bool bitmap_ready(MMBitmapRef bitmap){

View File

@ -41,7 +41,7 @@ MMBitmapRef copyMMBitmapFromDisplayInRect(MMRect rect){
bufferSize = CFDataGetLength(imageData); bufferSize = CFDataGetLength(imageData);
buffer = malloc(bufferSize); buffer = malloc(bufferSize);
CFDataGetBytes(imageData, CFRangeMake(0,bufferSize), buffer); CFDataGetBytes(imageData, CFRangeMake(0, bufferSize), buffer);
bitmap = createMMBitmap(buffer, bitmap = createMMBitmap(buffer,
CGImageGetWidth(image), CGImageGetWidth(image),