Skip to content

Commit

Permalink
C++ examples: minor improvements during review
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot committed Aug 16, 2024
1 parent 8f3fcab commit 5f0290c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 2 additions & 4 deletions examples/cpp-flat-layout/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

#define OBX_CPP_FILE

#define OBX_CPP_FILE

#include "objectbox.hpp"

Expand All @@ -24,7 +22,7 @@ int main(int argc, char* args[])
box.put(*task); // Update
}

printf("Your task has ID=%llu, text=%s\n",
printf("Your task has ID=%" PRIu64 ", text=%s\n",
id,
box.get(id)->text.c_str());

Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (DO_INSOURCE)
src/schema/monster.fbs
src/schema/another_monster.fbs
INSOURCE
CXX_STANDARD 14
CXX_STANDARD 14
)
target_include_directories(objectbox-test PRIVATE src/schema)
else()
Expand Down
6 changes: 2 additions & 4 deletions examples/cpp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

#define OBX_CPP_FILE

#define OBX_CPP_FILE

#include "objectbox.hpp"

Expand All @@ -24,7 +22,7 @@ int main(int argc, char* args[])
box.put(*task); // Update
}

printf("Your task has ID=%llu, text=%s\n",
printf("Your task has ID=%" PRIu64 ", text=%s\n",
id,
box.get(id)->text.c_str());

Expand Down

0 comments on commit 5f0290c

Please sign in to comment.