Skip to content

Commit

Permalink
Fix README example using clip::lock::set_data() incorrectly (fix #82)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Jan 26, 2025
1 parent 5370ca3 commit 43ed5f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ int main() {
clip::register_format("com.appname.FormatName");

int value = 32;
std::string str = "Alternative text for value 32";

clip::lock l;
l.clear();
l.set_data(clip::text_format(), "Alternative text for value 32");
l.set_data(my_format, &value, sizeof(int));
l.set_data(clip::text_format(), str.c_str(), str.size());
l.set_data(my_format, (const char*)&value, sizeof(int));
}
```

Expand Down

0 comments on commit 43ed5f0

Please sign in to comment.