replace #define with constrexpr for better compiler error reports on integer constants
This commit is contained in:
@ -74,7 +74,8 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
#define MAX_BUF_SIZE 128
|
||||
static constexpr int MAX_BUF_SIZE=128;
|
||||
|
||||
TEST_F(FileOperationsTest, safe_fgets)
|
||||
{
|
||||
char buf[MAX_BUF_SIZE];
|
||||
@ -110,7 +111,6 @@ TEST_F(FileOperationsTest, safe_fgets)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
#define MAX_BUF_SIZE 128
|
||||
TEST_F(FileOperationsTest, fgets_trunc)
|
||||
{
|
||||
char buf[MAX_BUF_SIZE];
|
||||
@ -174,7 +174,6 @@ TEST_F(FileOperationsTest, fgets_trunc)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
#define MAX_BUF_SIZE 128
|
||||
TEST_F(FileOperationsTest, safe_fread)
|
||||
{
|
||||
char buf[MAX_BUF_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user