mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-11-29 14:23:34 +01:00
feat: great beautiful fixes
This commit is contained in:
parent
67da5c4fb9
commit
ac7d678007
@ -39,11 +39,14 @@ void pauseForGivenTime(float given_time)
|
||||
|
||||
float calculateVelocity(float starting_velocity, unsigned int physics_time, int *acceleration)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
return (*acceleration) * physics_time + starting_velocity;
|
||||
}
|
||||
|
||||
int calculateDisplacement(float starting_velocity, int *acceleration, unsigned int physics_time)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
// cppcheck-suppress ctunullpointer
|
||||
return starting_velocity * physics_time + ((1 / 2) * (*acceleration) * (physics_time ^ 2));
|
||||
}
|
||||
|
||||
@ -55,7 +58,7 @@ void printXPosition(int position)
|
||||
|
||||
void printClock(unsigned int *time)
|
||||
{
|
||||
printf("%d seconds passed\n", *time);
|
||||
printf("%u seconds passed\n", *time);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Clang-format configuration for imageViewer project
|
||||
---
|
||||
Language: C
|
||||
Language: Cpp
|
||||
# Base style
|
||||
BasedOnStyle: LLVM
|
||||
|
||||
|
||||
@ -447,6 +447,7 @@ static void find_longest_excerpt(int max_vocab)
|
||||
rarest_word = word_sequence[i]->word;
|
||||
}
|
||||
}
|
||||
// cppcheck-suppress nullPointer
|
||||
printf("Rarest word used: %s (#%d)\n", rarest_word, max_rank_used);
|
||||
|
||||
/* Count unique words in excerpt */
|
||||
|
||||
@ -63,6 +63,7 @@ bool validInput(const std::string s) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// cppcheck-suppress missingReturn
|
||||
std::vector<int> requiredShoots(const int pointsLeft) {}
|
||||
|
||||
int main() {
|
||||
|
||||
@ -43,14 +43,14 @@ bool errorUserInput(std::string userInput) {
|
||||
|
||||
std::string convertToTier(float nominator, float denominator) {
|
||||
float fraction = nominator / denominator;
|
||||
int tierIndex;
|
||||
int tierIndex = 0;
|
||||
for (int i = TIER_BASE; i > 0; i--) {
|
||||
if (fraction >= (i / TIER_BASE)) {
|
||||
tierIndex = i - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (tierIndex == 0 & fraction > (1.1 / 10.0))
|
||||
if (tierIndex == 0 && fraction > (1.1 / 10.0))
|
||||
return TIERS[1];
|
||||
return TIERS[tierIndex];
|
||||
}
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE(MyApplication,
|
||||
my_application,
|
||||
MY,
|
||||
APPLICATION,
|
||||
G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
|
||||
GtkApplication)
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user