Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09ca565

Browse files
Use size_t instead of int in blob internals
1 parente167e6d commit09ca565

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎blobstamper/blob.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
*
3-
* Copyright 2021 Nikolay Shaplov (Postgres Professional)
3+
* Copyright 2021-2023 Nikolay Shaplov (Postgres Professional)
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
2424
#include"stamp.h"
2525

2626

27-
Blob::Blob (char * data_in,int size_in)
27+
Blob::Blob (char * data_in,size_t size_in)
2828
{
2929
data = data_in;
3030
size = size_in;
@@ -42,7 +42,7 @@ Blob::isEmpty ()
4242
void
4343
Blob::Dump()
4444
{
45-
int length = end - begin +1 ;
45+
size_t length = end - begin +1 ;
4646
hexdump(data + begin, length);
4747
}
4848

‎blobstamper/blob.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
*
3-
* Copyright 2021 Nikolay Shaplov (Postgres Professional)
3+
* Copyright 2021-2023 Nikolay Shaplov (Postgres Professional)
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -30,11 +30,11 @@ class Blob
3030
{
3131
protected:
3232
char* data;
33-
int size;
34-
int begin;
35-
int end;
33+
size_t size;
34+
size_t begin;
35+
size_t end;
3636
public:
37-
Blob(char * data,int size);
37+
Blob(char * data,size_t size);
3838
boolisEmpty ();
3939
size_tSize();
4040
voidDump();
@@ -55,4 +55,4 @@ class NotImplemented /*An exeption */
5555

5656
};
5757

58-
#endif/*BLOB_H*/
58+
#endif/*BLOB_H*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp