Skip to content

Commit

Permalink
removes fmt finally and fixes linter
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNotary committed Sep 10, 2024
1 parent 9a1d593 commit f8fb547
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ add_test(NAME AllTestsInMain COMMAND KeyboardTest)
# Define the BUILD_DLL macro for the library build
target_compile_definitions(blink PRIVATE BUILD_DLL)

# fmt dependency
find_package(fmt CONFIG REQUIRED)
target_link_libraries(main PRIVATE fmt::fmt)
target_link_libraries(blink PRIVATE fmt::fmt)
target_link_libraries(KeyboardTest PRIVATE fmt::fmt)

# Google Benchmark
find_package(benchmark CONFIG REQUIRED)
add_executable(KeyboardBenchmark "benchmark/rk84_benchmark.cpp")
Expand Down
5 changes: 2 additions & 3 deletions src/blink/usb_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <algorithm>

#include <windows.h>
#include <fmt/core.h>
#include <setupapi.h>
#include <stdio.h>
#include <hidsdi.h>
Expand Down Expand Up @@ -131,7 +130,7 @@ void DoAdditionalUsbThings(HANDLE hDev) {
HIDP_CAPS capabilities;
NTSTATUS capsResult = HidP_GetCaps(preparsedData, &capabilities);
if (capsResult == 0x0011000000)
fmt::print("compared...");
printf("compared...");

HidD_FreePreparsedData(preparsedData);
}
Expand Down Expand Up @@ -259,7 +258,7 @@ std::vector<KeyboardInfo> ListAvailableKeyboards() {

CloseHandle(hDev);

for (int i = 0; i < known_keyboards.size(); i++) {
for (size_t i = 0; i < known_keyboards.size(); i++) {
KeyboardInfo known_keyboard = known_keyboards[i];
if (deviceAttributes.VendorID == known_keyboard.vid && deviceAttributes.ProductID == known_keyboard.pid) {

Expand Down
3 changes: 2 additions & 1 deletion src/demo/choose_keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ KeyboardInfo ChooseKeyboard() {

std::cout << "Keyboards Available:" << std::endl;
int i;
for (i = 0; i < available_keebs.size(); i++) {
int n_available_keebs = available_keebs.size();
for (i = 0; i < n_available_keebs; i++) {
KeyboardInfo keeb = available_keebs[i];
std::cout << i + 1 << ". " << keeb.display_name
<< " [" << std::hex << keeb.vid << ":" << keeb.pid << "]"
Expand Down
1 change: 0 additions & 1 deletion src/demo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <unordered_map>

#include <windows.h>
#include <fmt/core.h>

#include "choose_keyboard.h"
#include "choose_activity.h"
Expand Down
1 change: 0 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"dependencies": [
"fmt",
"gtest",
"benchmark"
]
Expand Down

0 comments on commit f8fb547

Please sign in to comment.